Skip to content

Commit 2a46ee0

Browse files
committed
display/core_auth: preserve IGT skip semantics and log DRM node
Update the core_auth runner to preserve IGT skip semantics without adding a runner-side skip gate. Changes in this update: - use get_drm_primary_node() only for diagnostic logging - log the DRM primary node when present - warn and continue when no DRM primary node is found - 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 2a46ee0

File tree

1 file changed

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

1 file changed

+16
-7
lines changed

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

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ if [ -z "$INIT_ENV" ]; then
1616
fi
1717

1818
# Only source if not already loaded (idempotent)
19-
if [ -z "$__INIT_ENV_LOADED" ]; then
19+
if [ -z "${__INIT_ENV_LOADED:-}" ]; then
2020
# shellcheck disable=SC1090
2121
. "$INIT_ENV"
2222
fi
2323
# Always source functestlib.sh, using $TOOLS exported by init_env
24-
# shellcheck disable=SC1090,SC1091
24+
# shellcheck disable=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,13 @@ 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 [ -n "$dri_primary" ]; then
98+
log_info "Using DRM primary node: $dri_primary"
99+
else
100+
log_warn "$TESTNAME : DRM primary node /dev/dri/card* not present, continuing and letting core_auth determine outcome"
101+
fi
102+
94103
if ! weston_stop; then
95104
log_error "Failed to stop Weston"
96105
echo "$TESTNAME FAIL" > "$result_file"
@@ -122,18 +131,18 @@ log_info "Subtest Results: SUCCESS=$success_count, FAIL=$fail_count, SKIP=$skip_
122131
log_info "results will be written to \"$result_file\""
123132
log_info "-------------------Completed $TESTNAME Testcase----------------------------"
124133

125-
if [ "$RC" -ne 0 ]; then
134+
if [ "$RC" -eq 77 ] || { [ "$skip_count" -gt 0 ] && [ "$success_count" -eq 0 ] && [ "$fail_count" -eq 0 ]; }; then
135+
log_skip "$TESTNAME : Test Skipped - All $skip_count subtest(s) were skipped"
136+
echo "$TESTNAME SKIP" > "$result_file"
137+
exit 0
138+
elif [ "$RC" -ne 0 ]; then
126139
log_fail "$TESTNAME : Test Failed (exit code: $RC)"
127140
echo "$TESTNAME FAIL" > "$result_file"
128141
exit 1
129142
elif [ "$fail_count" -gt 0 ]; then
130143
log_fail "$TESTNAME : Test Failed - $fail_count subtest(s) failed out of $total_subtests"
131144
echo "$TESTNAME FAIL" > "$result_file"
132145
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
137146
else
138147
if [ "$success_count" -gt 0 ]; then
139148
if [ "$skip_count" -gt 0 ]; then

0 commit comments

Comments
 (0)