Skip to content

Commit b6c5280

Browse files
committed
igt: skip core_auth when DRM primary node is unavailable
Update the core_auth runner to skip cleanly when no DRM primary node is present and to preserve IGT skip semantics. Changes in this update: - use get_drm_primary_node() from functestlib.sh to detect /dev/dri/card* - mark the test as SKIP when no DRM primary node is available - treat IGT rc=77 as SKIP instead of FAIL - keep other non-zero return codes as FAIL Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
1 parent e5ecb2a commit b6c5280

File tree

1 file changed

+16
-5
lines changed
  • Runner/suites/Multimedia/Display/igt-gpu-tools/core_auth

1 file changed

+16
-5
lines changed

Runner/suites/Multimedia/Display/igt-gpu-tools/core_auth/run.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ fi
2323
# Always source functestlib.sh, using $TOOLS exported by init_env
2424
# shellcheck disable=SC1090,SC1091
2525
. "$TOOLS/functestlib.sh"
26+
# shellcheck disable=SC1090,SC1091
27+
. "$TOOLS/lib_display.sh"
2628

2729
TESTNAME="core_auth"
2830
result_file="./${TESTNAME}.res"
@@ -91,6 +93,15 @@ fi
9193

9294
log_info "Using core_auth binary at: $CORE_AUTH_CMD"
9395

96+
dri_primary="$(get_drm_primary_node 2>/dev/null || true)"
97+
if [ -z "$dri_primary" ]; then
98+
log_skip "$TESTNAME : DRM primary node /dev/dri/card* not present; skipping core_auth"
99+
echo "$TESTNAME SKIP" > "$result_file"
100+
exit 0
101+
fi
102+
103+
log_info "Using DRM primary node: $dri_primary"
104+
94105
if ! weston_stop; then
95106
log_error "Failed to stop Weston"
96107
echo "$TESTNAME FAIL" > "$result_file"
@@ -122,18 +133,18 @@ log_info "Subtest Results: SUCCESS=$success_count, FAIL=$fail_count, SKIP=$skip_
122133
log_info "results will be written to \"$result_file\""
123134
log_info "-------------------Completed $TESTNAME Testcase----------------------------"
124135

125-
if [ "$RC" -ne 0 ]; then
136+
if [ "$RC" -eq 77 ] || { [ "$skip_count" -gt 0 ] && [ "$success_count" -eq 0 ] && [ "$fail_count" -eq 0 ]; }; then
137+
log_skip "$TESTNAME : Test Skipped - All $skip_count subtest(s) were skipped"
138+
echo "$TESTNAME SKIP" > "$result_file"
139+
exit 0
140+
elif [ "$RC" -ne 0 ]; then
126141
log_fail "$TESTNAME : Test Failed (exit code: $RC)"
127142
echo "$TESTNAME FAIL" > "$result_file"
128143
exit 1
129144
elif [ "$fail_count" -gt 0 ]; then
130145
log_fail "$TESTNAME : Test Failed - $fail_count subtest(s) failed out of $total_subtests"
131146
echo "$TESTNAME FAIL" > "$result_file"
132147
exit 1
133-
elif [ "$skip_count" -gt 0 ] && [ "$success_count" -eq 0 ]; then
134-
log_skip "$TESTNAME : Test Skipped - All $skip_count subtest(s) were skipped"
135-
echo "$TESTNAME SKIP" > "$result_file"
136-
exit 0
137148
else
138149
if [ "$success_count" -gt 0 ]; then
139150
if [ "$skip_count" -gt 0 ]; then

0 commit comments

Comments
 (0)