Skip to content

GStreamer imsdk camera test suite#405

Open
nitinn22 wants to merge 2 commits intoqualcomm-linux:mainfrom
nitinn22:feature/camera-gst
Open

GStreamer imsdk camera test suite#405
nitinn22 wants to merge 2 commits intoqualcomm-linux:mainfrom
nitinn22:feature/camera-gst

Conversation

@nitinn22
Copy link
Copy Markdown
Contributor

@nitinn22 nitinn22 commented Apr 15, 2026

This test suite provides comprehensive validation of camera functionality using GStreamer with Qualcomm's qtiqmmfsrc plugin (downstream) or libcamerasrc (upstream). Tests run in a specific sequence to validate different camera capabilities progressively.

The test suite automatically detects which camera source plugin is available:

  1. qtiqmmfsrc (Qualcomm CAMX downstream): Runs 10 tests

    • Fakesink (2) + Preview (2) + Encode (6)
    • Priority: Used by default when both plugins are detected
    • Supports NV12 and UBWC formats
  2. libcamerasrc (upstream): Runs 7 tests

    • Fakesink (1) + Preview (3) + Encode (3)
    • Used when qtiqmmfsrc is not available or explicitly requested
    • Supports NV12 format only

Lava job for reference with these changes, Refer https://lava.infra.foundries.io/scheduler/job/182439#L2523

@nitinn22 nitinn22 force-pushed the feature/camera-gst branch from 5638a88 to 54e7f3b Compare April 15, 2026 18:00
Copy link
Copy Markdown
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

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

This PR would be much easier to review and maintain if it is reduced to the minimum supported feature set.

Right now the suite is over-expanded for an initial submission: the runner is very large, the README is very long, and the shared library change includes helper additions that do not appear to be required by the suite’s current execution path.

Please tighten this PR. Suggested cleanup:

  1. Remove interfaces that are not actually implemented end-to-end yet

    • e.g. --test-name / CAMERA_TEST_NAME if single-test filtering is not wired up
    • remove snapshot-related helper additions if snapshot tests are not actually executed
  2. Keep only shared lib_gstreamer.sh helpers that are used by this suite today

  3. Reduce the README to the essentials

    • overview
    • prerequisites
    • actual supported test matrix
    • parameters
    • basic troubleshooting
  4. Split into 2 commits

    • shared helper additions
    • Camera_Tests suite files
  5. Fix the YAML wrapper to the repo-standard form while respinning

If needed, it would also be reasonable to reduce this to a smaller MVP first (for example only the verified backend/test paths), and then add more coverage in follow-up PRs.

Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/README.md Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/README.md Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/README.md Outdated
Comment thread Runner/utils/lib_gstreamer.sh Outdated
Comment thread Runner/utils/lib_gstreamer.sh Outdated
@nitinn22
Copy link
Copy Markdown
Contributor Author

nitinn22 commented Apr 17, 2026

  • Removed pipeline related functions from the lib_gstreamer.sh
  • Fixed a timeout bug in GStreamer pipeline execution
  • Enhanced error detection with SIGSEGV/crash detection, currently camera preview shows this error on recent builds.
  • Improved test output with file size reporting for encode tests

Copy link
Copy Markdown
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

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

Please squash the commits into

At most, 2 logical commits would make sense:

  1. shared Runner/utils/[lib_gstreamer.sh](http://lib_gstreamer.sh/) helper additions
  2. Camera_Tests suite files

Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
Signed-off-by: nitinn <nitinn@qti.qualcomm.com>
@nitinn22 nitinn22 force-pushed the feature/camera-gst branch from 72274d8 to e6e24b7 Compare April 18, 2026 02:48
@nitinn22
Copy link
Copy Markdown
Contributor Author

quashed commits as suggested.
Final history now contains two logical commits:

  • shared Runner/utils/lib_gstreamer.sh helper changes
  • Camera_Tests suite files and all follow‑up fixes

Please review. Thanks!

@nitinn22 nitinn22 force-pushed the feature/camera-gst branch from ff80587 to 35f4a80 Compare April 18, 2026 03:01
@smuppand smuppand added the enhancement New feature or request label Apr 18, 2026
Copy link
Copy Markdown
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

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

The PR is much closer now, and I no longer see the previous major structural blockers. Only minor comment fixes and the main shell lint issues remain.

Comment thread Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/run.sh Outdated
@nitinn22 nitinn22 force-pushed the feature/camera-gst branch from adecc41 to 99ff31a Compare April 19, 2026 00:22
- cd "$REPO_PATH/Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests"
- export CAMERA_ID CAMERA_PLUGIN CAMERA_TEST_MODES CAMERA_FORMATS CAMERA_RESOLUTIONS CAMERA_FRAMERATE CAMERA_DURATION CAMERA_GST_DEBUG
- ./run.sh --camera-id "${CAMERA_ID}" --plugin "${CAMERA_PLUGIN}" --test-modes "${CAMERA_TEST_MODES}" --formats "${CAMERA_FORMATS}" --resolutions "${CAMERA_RESOLUTIONS}" --framerate "${CAMERA_FRAMERATE}" --duration "${CAMERA_DURATION}" --gst-debug "${CAMERA_GST_DEBUG}" --lava-testcase-id "${LAVA_TESTCASE_ID}" || true
- "$REPO_PATH/Runner/utils/send-to-lava.sh" Camera_Tests.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.

This line in the current YAML is invalid YAML. Because YAML reads the first quoted part as one complete string.

definition: lava
case: job
result: fail
error_msg: Unable to open test definition 'Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/Camera_Tests.yaml': while parsing a block collection in "/var/lib/lava/dispatcher/tmp/182770/lava-overlay-en67i_an/home/lava-182770/0/tests/0_Weston_Runtime_Preflight/Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/Camera_Tests.yaml", line 28, column 5 did not find expected '-' indicator in "/var/lib/lava/dispatcher/tmp/182770/lava-overlay-en67i_an/home/lava-182770/0/tests/0_Weston_Runtime_Preflight/Runner/suites/Multimedia/GSTreamer/Camera/Camera_Tests/Camera_Tests.yaml", line 32, column 49
error_type: Job

Signed-off-by: nitinn <nitinn@qti.qualcomm.com>
@nitinn22 nitinn22 force-pushed the feature/camera-gst branch from e1fe9e8 to 79aee01 Compare April 19, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants