[PATCH v2 i-g-t v2] tests/core_setmaster: Change break to continue in tweak_perm function

Bommu Krishnaiah krishnaiah.bommu at intel.com
Fri Jul 26 10:26:18 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.

Failure sequence:

card0  renderD128  version

Subtest master-drop-set-user: SUCCESS (0.061s)

card0  renderD128  version

Subtest hotrebind-lateclose: SUCCESS (2.791s)

ls /sys/class/drm/
card1  renderD129  version

root at DUT4419LNL:/usr/local/libexec/igt-gpu-tools# ./core_setmaster --r master-drop-set-user
Subtest master-drop-set-user: FAIL (0.017s)

Failure on XE

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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/core_setmaster.c b/tests/core_setmaster.c
index 9c2083f66..60ae06331 100644
--- a/tests/core_setmaster.c
+++ b/tests/core_setmaster.c
@@ -116,9 +116,8 @@ 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. */
 		if (stat(path, &st) != 0)
-			break;
+			continue;
 
 		if (save) {
 			/* Save and toggle */
-- 
2.25.1



More information about the igt-dev mailing list