diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2021-02-01 21:41:02 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2021-02-01 21:41:02 +0000 |
commit | 07bd70d1155ea9b7eb99367220eb54ec02556e46 (patch) | |
tree | 6c76b7bf35c21978b14f8f6f7b8ff91baeb3c5ee /tests/i915/sysfs_clients.c | |
parent | ccfc101419c1e233f87ca509781c5f8e09a2f3ae (diff) |
i915/sysfs_clients: Restrict recycling to one client
Let's see if the directory is stable when just one client is looking.
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Diffstat (limited to 'tests/i915/sysfs_clients.c')
-rw-r--r-- | tests/i915/sysfs_clients.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/i915/sysfs_clients.c b/tests/i915/sysfs_clients.c index ab0e39cd..0b7066c0 100644 --- a/tests/i915/sysfs_clients.c +++ b/tests/i915/sysfs_clients.c @@ -303,10 +303,8 @@ static unsigned long recycle_client(int i915, int clients) return client; } -static void recycle(int i915, int clients) +static void recycle(int i915, int clients, int nchildren) { - const int ncpus = sysconf(_SC_NPROCESSORS_ONLN); - /* * As we open and close clients, we do not expect to reuse old ids, * i.e. we use a cyclic ida. This reduces the likelihood of userspace @@ -315,7 +313,7 @@ static void recycle(int i915, int clients) */ igt_assert(my_id(clients, getpid())); - igt_fork(child, 2 * ncpus) { + igt_fork(child, nchildren) { unsigned long client, last; /* Reopen the directory fd for each client */ @@ -1044,7 +1042,10 @@ igt_main create(i915, clients); igt_subtest("recycle") - recycle(i915, clients); + recycle(i915, clients, 1); + + igt_subtest("recycle-many") + recycle(i915, clients, 2 * sysconf(_SC_NPROCESSORS_ONLN)); igt_subtest_group test_busy(i915, clients); |