tests/intel/gem_exec_capture: changing the test size breaks the run
After fixing most of the tests/intel/gem_exec_capture: many-* subtests with this patch, I noticed a few oddities.
Sub-issue 1: tests fail if called in a sequence:
- The tests will run fine when running one at a time with
--run-subtest
, but only the first one will succeed when they are run in a sequence such as when calling./builddir/tests/gem_exec_capture
without arguments. - When running multiple tests in a sequence, changing the
size
argument of the function many() is what seems to cause the failure. - If a test fails, calling it a second time solves the issue. Calling the same test multiple times in a sequence will also work.
- Closing and reopening the file descriptor
fd
between tests solves the issue
Sub-issue 2: Capturing 0 blobs:
- On success, the test will print the number of blobs captured. For example, for the
many-2M-incremental
, the output may beCaptured 0 512-blobs out of a total of 256
. - Running the same test again without closing and reopening the
fd
will change the number of captured blobs to max, or to 256 in our example:Captured 256 512-blobs out of a total of 256
.
My first idea was that there was some memory content leftover from the previous test that was causing these issues(assuming they are related), but I found no evidence of that.
Do you have ideas I can explore to try to find out what is going on here?
Edited by Peter Senna Tschudin