tests/intel/gem_exec_capture: changing the test size breaks the run

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Apr 24 16:33:33 UTC 2024


Hi Peter,

On 2024-04-11 at 21:41:11 +0200, Peter Senna Tschudin wrote:
> Dear list,
> 
> After my change*, most of the subtests from gem_exec_capture work, but
> only if called one by one using --run-subtest. Here is an example:
> 
> $ sudo ./builddir/tests/gem_exec_capture --run-subtest many-4k-incremental
> IGT-Version: 1.28-gd54e42369 (x86_64) (Linux: 6.8.4-200.fc39.x86_64 x86_64)
> Using IGT_SRANDOM=1712863518 for randomisation
> Opened device: /dev/dri/card1
> Starting subtest: many-4K-incremental
> Target died after 20.010192s
> Captured 0 1-blobs out of a total of 131072
> Subtest many-4K-incremental: SUCCESS (22.813s)
> 
> $ sudo ./builddir/tests/gem_exec_capture --run-subtest many-2M-incremental
> IGT-Version: 1.28-gd54e42369 (x86_64) (Linux: 6.8.4-200.fc39.x86_64 x86_64)
> Using IGT_SRANDOM=1712863571 for randomisation
> Opened device: /dev/dri/card1
> Starting subtest: many-2M-incremental
> Target died after 20.059585s
> Captured 0 512-blobs out of a total of 256
> Subtest many-2M-incremental: SUCCESS (20.443s)
> 
> When not specifying the sub-test the same tests will fail. Here is the
> code that calls the tests when no sub-test is set:
> 
>     igt_subtest_f("many-4K-incremental") {
>         igt_require(gem_can_store_dword(fd, 0));
>         many(fd, dir, 1<<12, INCREMENTAL);
>     }
> 
>     igt_subtest_f("many-2M-incremental") {
>         igt_require(gem_can_store_dword(fd, 0));
>         many(fd, dir, 2<<20, INCREMENTAL);
>     }
> 
> The test many-4K-incremental will succeed and the test
> many-2M-incremental will fail. I noticed that changing the parameter
> size of the function many() is what causes the test to fail. This
> means you can successfully call many() as many times as you want,
> given all calls use the same value for size. Now see the following
> code:
> 
>     // This will succeed but "Captured 0 1-blobs out of a total of 131072"
>     igt_subtest_f("many-4K-incremental") {
>         igt_require(gem_can_store_dword(fd, 0));
>         many(fd, dir, 1<<12, INCREMENTAL);
>     }
> 
>     // This will fail
>     igt_subtest_f("many-2M-incremental") {
>         igt_require(gem_can_store_dword(fd, 0));
>         many(fd, dir, 2<<20, INCREMENTAL);
>     }
> 
>     // Captured 256 512-blobs out of a total of 256
>     igt_subtest_f("many-2M-incremental") {
>         igt_require(gem_can_store_dword(fd, 0));
>         many(fd, dir, 2<<20, INCREMENTAL);
>     }
> 
> There are two oddities:
>  - First: simply running the same test again makes it succeed.
>  - Second: Running the same test a second time changes the value of
> Captured from 0 to max.
> 
> Besides calling the test twice, closing and reopening the fd will also
> make the calls  succeed.
> 
> My first idea was that there was some memory content that was causing
> the issue, but I found no evidence of that.
> 
> Do you have ideas I can explore to try to find out what is going on here?
> 
> Thank you,
> 
> Peter
> 

These looks like a candidate to GitLab issue, where you can add
a story and descriptions. Did any of your other patches helped?

Btw that 0 captured seems a bit odd, also tests times 20s is much
too long.

Regard,
Kamil

> 
> * - https://patchwork.freedesktop.org/series/132291/


More information about the igt-dev mailing list