Skip to content

chore(multimedia): fix ShellCheck SC2317 warnings in audio, camera, fastrpc, and video tests#390

Merged
vnarapar merged 4 commits intoqualcomm-linux:mainfrom
smuppand:gstreamer
Apr 7, 2026
Merged

chore(multimedia): fix ShellCheck SC2317 warnings in audio, camera, fastrpc, and video tests#390
vnarapar merged 4 commits intoqualcomm-linux:mainfrom
smuppand:gstreamer

Conversation

@smuppand
Copy link
Copy Markdown
Contributor

@smuppand smuppand commented Apr 7, 2026

This PR addresses a small set of ShellCheck SC2317 warnings in multimedia test scripts without changing the existing runtime behavior.

What is changed:

  • add a targeted SC2317 suppression for the trap-driven cleanup helper in GSTreamer Audio_Playback
  • move Libcamera_cam artifact logging above the final exit path so it is reachable and still printed
  • add a targeted SC2317 suppression for the optional log_debug helper in fastrpc_test
  • remove an unreachable trailing exit in Video_V4L2_Runner

Why this is needed:
ShellCheck reported a mix of true unreachable code and indirect-use helpers that it could not statically resolve. This PR fixes the real unreachable blocks and uses narrow suppressions only where the code is intentionally reachable through trap or optional helper flow.

Impact:

  • resolves the reported SC2317 warnings
  • keeps current testcase flow and behavior intact
  • avoids broader functional changes and unnecessary reruns

smuppand added 4 commits April 7, 2026 22:38
indirectly via trap on EXIT/INT/TERM.

ShellCheck reports SC2317 on the pkill call because it cannot see the
trap-based invocation path, but the function is valid and part of the
existing cleanup flow.

Add a targeted SC2317 suppression on cleanup() without changing runtime
behavior.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
path, making that block unreachable and triggering ShellCheck SC2317.

Move the artifact summary logging above the final verdict so the logs are
actually emitted while preserving the existing PASS/FAIL behavior and
result-file flow.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
use, but ShellCheck flags it with SC2317 because it is not exercised in
the normal visible path.

Add a narrow SC2317 suppression for the helper without changing the
current test flow or runtime behavior.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
result block, so the trailing exit  is dead code and triggers
ShellCheck SC2317.

Remove the unreachable exit without changing the testcase result flow,
logging, or exit semantics.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@smuppand smuppand requested review from abbajaj806 and vnarapar April 7, 2026 17:12
Copy link
Copy Markdown
Contributor

@vnarapar vnarapar left a comment

Choose a reason for hiding this comment

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

LGTM

@vnarapar vnarapar merged commit c611ade into qualcomm-linux:main Apr 7, 2026
12 checks passed
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