mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
fix(quest): check a caught-up KGSL context at timestamp zero too
A context with no submissions skipped the ownership check. Check whenever nothing is pending, since a pending timestamp's wait already checks it.
This commit is contained in:
1 parent
6d7732710c
commit
1259abed5f
2 files changed
+10
-5
No files matched your search
@@ -74,8 +74,13 @@ int main(void) {
|
||||
assert(read_timestamp(3, ×tamp) == -1 && errno == EACCES && waits == 0);
|
||||
|
||||
create_context(3);
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 0 && waits == 0);
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 0 && waits == 1);
|
||||
|
||||
wait_error = EINVAL;
|
||||
assert(read_timestamp(3, ×tamp) == -1 && errno == EINVAL);
|
||||
wait_error = 0;
|
||||
|
||||
waits = 0;
|
||||
read_error = EBADF;
|
||||
assert(read_timestamp(3, ×tamp) == -1 && errno == EBADF && waits == 0);
|
||||
read_error = EACCES;
|
||||
@@ -95,11 +100,11 @@ int main(void) {
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 2 && waits == 3);
|
||||
|
||||
waits = 0;
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 2 && waits == 2);
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 2 && waits == 1);
|
||||
|
||||
retired = 3;
|
||||
waits = 0;
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 3 && waits == 2);
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 3 && waits == 1);
|
||||
|
||||
waits = 0;
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 3 && waits == 1);
|
||||
@@ -123,7 +128,7 @@ int main(void) {
|
||||
create_context(3);
|
||||
retired = 0;
|
||||
waits = 0;
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 0 && waits == 0);
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 0 && waits == 1);
|
||||
|
||||
struct kgsl_drawctxt_destroy destroy = {.drawctxt_id = 3};
|
||||
bl_kgsl_track(mock, 42, IOCTL_KGSL_DRAWCTXT_DESTROY, &destroy, &rc);
|
||||
|
||||
Reference in new issue
Block a user