Skip to content

Add automated V4L2 test workflow#51

Open
grawis wants to merge 2 commits into
sysprog21:masterfrom
grawis:add-v4l2-test-workflow
Open

Add automated V4L2 test workflow#51
grawis wants to merge 2 commits into
sysprog21:masterfrom
grawis:add-v4l2-test-workflow

Conversation

@grawis

@grawis grawis commented Jun 10, 2026

Copy link
Copy Markdown

Summary

Add a make test-v4l2 target for repeatable local V4L2 validation.

The test workflow:

  • Builds the kernel module and vcam-util.
  • Loads the required videobuf2 modules.
  • Reloads vcam.ko.
  • Detects the created /dev/videoX device.
  • Runs v4l2-compliance -f.
  • Runs v4l2-ctl --all.
  • Runs v4l2-ctl --list-formats-ext.
  • Saves the output and recent dmesg messages in a timestamped artifact
    directory.

Artifacts are stored under:

artifacts/v4l2-YYYYMMDD-HHMMSS/

The artifact directory is excluded through .gitignore. With pipefail
enabled, failures from the main validation commands cause the test target
to fail instead of being hidden by tee.

Usage

make test-v4l2

The workflow requires v4l-utils, kernel module build dependencies, and
permission to run the required commands through sudo.


Summary by cubic

Add make test-v4l2 to run a repeatable local V4L2 validation and save logs as artifacts. This helps catch driver issues and makes results easy to share.

  • New Features

    • make test-v4l2 runs scripts/test-v4l2.sh to build, load videobuf2_*, reload vcam.ko, and run v4l2-compliance and v4l2-ctl on the created device.
    • Saves outputs and a dmesg tail to artifacts/v4l2-YYYYMMDD-HHMMSS/ (ignored). Fails on validation errors. Usage: make test-v4l2 (needs v4l-utils, build deps, and sudo).
  • Bug Fixes

    • More robust device detection: parse vcam-util -l to find /dev/videoX, persist to device.env, and fail if not found.

Written for commit d30c6cb. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread scripts/test-v4l2.sh Outdated
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.

1 participant