Skip to content

Add IGT display test wrappers with default binary paths - #535

Open
vsalipal wants to merge 1 commit into
qualcomm-linux:mainfrom
vsalipal:onboard-Display-IGT-tests
Open

Add IGT display test wrappers with default binary paths#535
vsalipal wants to merge 1 commit into
qualcomm-linux:mainfrom
vsalipal:onboard-Display-IGT-tests

Conversation

@vsalipal

Copy link
Copy Markdown
Contributor
  • added dmabuf test
  • Added kms_vblank test with subtest filtering (excludes suspend/rpm)
  • Added kms_sysfs_edid_timing test for EDID validation
  • Added kms_setmode test for mode setting validation
  • Created README.md documentation for all tests

All tests now use /usr/libexec/igt-gpu-tools/ as default path and support optional binary path override via CLI arguments.

@smuppand

Copy link
Copy Markdown
Contributor

vsalipal Squash the executable-permission repair into the feature commit.


log_info "Using dmabuf binary at: $DMABUF_CMD"

if ! weston_stop; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All four wrappers stop Weston but never restart it on PASS, FAIL, or SKIP.

Follow core_auth/run.sh: source lib_display.sh, track weston_stopped_by_test, and call weston_restore_runtime on every exit path, including signals. The equivalent locations are kms_setmode:90, kms_sysfs_edid_timing:90, and kms_vblank:104.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source lib_display.sh, snapshot whether Weston was running before stopping it, set the flag only when this test stopped an active compositor, and restore with weston_restore_runtime.

log_info "results will be written to \"$result_file\""
log_info "-------------------Completed $TESTNAME Testcase----------------------------"

if [ "$RC" -ne 0 ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any nonzero return code is classified as FAIL before skip handling. IGT uses exit code 77 for skipped tests, as the README itself states.

Handle RC=77 before the general nonzero branch. Apply the same correction at kms_setmode:120, kms_sysfs_edid_timing:120, and kms_vblank:135.


log_file="$test_path/${TESTNAME}_log.txt"
log_info "Running with arguments: $TEST_ARGS"
eval "$KMS_VBLANK_CMD $TEST_ARGS" > "$log_file" 2>&1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove eval from command execution. Both the binary path and subtest pattern enter eval.

Store only the pattern and invoke "$KMS_VBLANK_CMD" --run-subtest "$RUN_SUBTEST" directly.

- added dmabuf test
- Added kms_vblank test with subtest filtering (excludes suspend/rpm)
- Added kms_sysfs_edid_timing test for EDID validation
- Added kms_setmode test for mode setting validation
- Created README.md documentation for all tests

All tests now use /usr/libexec/igt-gpu-tools/ as default path
and support optional binary path override via CLI arguments.

Signed-off-by: Salipalli(Temp), Venkata Satya Raja Preetam Jagan <vsalipal@qti.qualcomm.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No LAVA test definitions are added. Add one YAML definition per suite with metadata, optional parameters, separate repository-path and cd steps, invocation, and send-to-lava.sh.


log_info "Using dmabuf binary at: $DMABUF_CMD"

if ! weston_stop; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source lib_display.sh, snapshot whether Weston was running before stopping it, set the flag only when this test stopped an active compositor, and restore with weston_restore_runtime.

log_info "-------------------Starting $TESTNAME Testcase-----------------------------"

# Check if the binary exists and is executable
if [ ! -x "$DMABUF_CMD" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional IGT binaries are reported as FAIL. Record SKIP when the requested binary is absent or non-executable; reserve FAIL for a binary that was found and whose validation failed.

trap 'if [ "$weston_stopped_by_test" -eq 1 ]; then weston_start || true; fi' EXIT INT TERM HUP

TESTNAME="dmabuf"
result_file="./${TESTNAME}.res"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the standard bootstrap and shared result lifecycle, with RES_FILE anchored at "$SCRIPT_DIR/${TESTNAME}.res" for all early exits.


log_file="$test_path/${TESTNAME}_log.txt"
log_info "Running with subtest pattern: $RUN_SUBTEST"
"$KMS_VBLANK_CMD" --run-subtest "$RUN_SUBTEST" > "$log_file" 2>&1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IGT execution has no bounded timeout. Add a configurable, bounded timeout around each IGT invocation and report timeout as FAIL after restoration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants