[PATCH i-g-t] tests/core_setmaster: Change break to continue in tweak_perm function
Bommu Krishnaiah
krishnaiah.bommu at intel.com
Thu Jul 25 05:43:11 UTC 2024
Existing userspace assumes there's no gaps card’s, but I see cards
are not continues, after running “gta at core_hotunplug I am not seeing card0,
hence test is failing.
Test result before this changes:
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools#
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools# cat /sys/class/drm/
card0/ renderD128/ version
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools# ./core_setmaster --r master-drop-set-user
IGT-Version: 1.28-NO-GIT (x86_64) (Linux: 6.10.0-rc7-xe x86_64)
Using IGT_SRANDOM=1721882790 for randomisation
Starting subtest: master-drop-set-user
Opened device: /dev/dri/card0
Subtest master-drop-set-user: SUCCESS (0.066s)
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools#
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools# ./core_hotunplug --r hotrebind-lateclose
IGT-Version: 1.28-NO-GIT (x86_64) (Linux: 6.10.0-rc7-xe x86_64)
Using IGT_SRANDOM=1721882819 for randomisation
Opened device: /dev/dri/card0
Starting subtest: hotrebind-lateclose
Opened device: /dev/dri/renderD128
Unloaded audio driver snd_hda_intel
Realoading snd_hda_intel
Opened device: /dev/dri/card1
Opened device: /dev/dri/renderD129
Subtest hotrebind-lateclose: SUCCESS (2.721s)
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools#
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools#
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools#
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools# cat /sys/class/drm/
card1/ renderD129/ version
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools# ./core_setmaster --r master-drop-set-user
IGT-Version: 1.28-NO-GIT (x86_64) (Linux: 6.10.0-rc7-xe x86_64)
Using IGT_SRANDOM=1721882840 for randomisation
Starting subtest: master-drop-set-user
(core_setmaster:4366) CRITICAL: Test assertion failure function check_drop_set, file ../tests/core_setmaster.c:85:
(core_setmaster:4366) CRITICAL: Failed assertion: master != -1
(core_setmaster:4366) CRITICAL: Last errno: 2, No such file or directory
(core_setmaster:4366) CRITICAL: error: -1 == -1
Stack trace:
#0 [__igt_fail_assert+0x10a]
#1 [check_drop_set+0x70]
#2 [__igt_unique____real_main145+0x355]
#3 [main+0x2d]
#4 [__libc_init_first+0x90]
#5 [__libc_start_main+0x80]
#6 [_start+0x2e]
child 0 failed with exit status 98
Subtest master-drop-set-user failed.
No log.
Subtest master-drop-set-user: FAIL (0.019s)
root at DUT1523LNL:/usr/local/libexec/igt-gpu-tools#
Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
Cc: Emil Velikov <emil.l.velikov at gmail.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
---
tests/core_setmaster.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/core_setmaster.c b/tests/core_setmaster.c
index 9c2083f66..c02eaf671 100644
--- a/tests/core_setmaster.c
+++ b/tests/core_setmaster.c
@@ -116,9 +116,9 @@ static unsigned tweak_perm(uint8_t *saved_perm, unsigned max_perm, bool save)
for (i = 0; i < max_perm; i++) {
snprintf(path, sizeof(path), "/dev/dri/card%u", i);
- /* Existing userspace assumes there's no gaps, do the same. */
+ /* Existing userspace assumes there is a gaps, hence continues. */
if (stat(path, &st) != 0)
- break;
+ continue;
if (save) {
/* Save and toggle */
--
2.25.1
More information about the igt-dev
mailing list