Repository navigation
Conversation
1cd7af0 to
e7f596c
Compare
| - REPO_PATH=$PWD | ||
| - cd Runner/suites/Multimedia/Video/Video_V4L2_Runner/ | ||
| - VIDEO_POLICY_SCOPE="${VIDEO_POLICY_SCOPE}" VIDEO_VERIFY="${VIDEO_VERIFY}" VIDEO_MIN_PSNR="${VIDEO_MIN_PSNR}" ./run.sh --app "${APP_PATH}" --config "${CONFIG_PATH}" --platform "${PLATFORM}" --stack "${VIDEO_STACK}" --loglevel "${LOGLEVEL}" --retry-on-fail "${RETRY_ON_FAIL}" --post-test-sleep "${POST_TEST_SLEEP}" || true | ||
| - $REPO_PATH/Runner/utils/send-to-lava.sh H264_Record_QC08C_Multislice_1920x1080.res || true |
There was a problem hiding this comment.
Both new YAMLs publish a result filename that run.sh never creates. The runner always writes Video_V4L2_Runner.res, including its early SKIP and failure paths. send-to-lava.sh only warns when the requested file is missing and emits no testcase signal. I reproduced this for PASS, FAIL and SKIP, so these definitions can finish without reporting the video verdict.
Please publish the actual runner result in both definitions. If distinct testcase IDs are required, add a compatible explicit result identity to the shared runner while preserving its existing default. Use the publisher's --strict check without masking its failure so missing results cannot silently pass. The existing --legacy-testcase-id option only handles one-word result files, so it will not rename this runner's two-field records.
There was a problem hiding this comment.
Added a --testname NAME flag to run.sh that overrides both the .res filename and the two-field verdict string written to it, while preserving Video_V4L2_Runner as the default for all existing jobs. RES_FILE is now set to an absolute path (
There was a problem hiding this comment.
The new override fixes the normal result filename. The publication guard is still missing: send-to-lava.sh returns success for an absent file unless --strict or --expected-testcase-id is supplied. Please use --expected-testcase-id with the intended result identity in both YAMLs so an early runner failure cannot finish without a testcase signal.
There was a problem hiding this comment.
Both YAMLs now pass --expected-testcase-id Video_V4L2_config1 to send-to-lava.sh. From the script, --expected-testcase-id automatically sets STRICT=1 and validates that the testcase ID in the .res file matches the expected value. If the file is absent, empty, or contains a mismatched ID, send-to-lava.sh exits non-zero — an early runner failure (app missing, dependency check, stack validation) cannot finish silently without a testcase signal. Verified on LeMans: absent file → exit 1 with [ERROR] No complete valid result set to publish; mismatched ID → exit 1 with [WARNING] Invalid strict result; correct ID with PASS/SKIP → exit 0 with LAVA signal emitted.
| @@ -0,0 +1,68 @@ | |||
| { | |||
There was a problem hiding this comment.
Adding both JSONs here also changes existing jobs that never select the new YAMLs. Video_V4L2_Runner.yaml defaults to CONFIG_PATH=./, and the runner recursively discovers every JSON. The same discovery code selects 10 configurations at the base revision and 12 with this PR. Existing images without the new /usr/v4l2 clips now hit the missing-input FAIL path. The legacy VIDEO_POLICY_SCOPE=bundled also excludes this encoder from Shikra's Level 4.0 adjustment.
For the layout question in the description, keep independently selectable YAMLs and reuse the existing runner, but make these additional configurations opt-in: place them outside the runner's default scan, for example in sibling directories under Multimedia/Video, or explicitly preserve the existing default selection. A higher-level plan or a subdirectory inside this recursively scanned directory alone will not prevent the regression.
There was a problem hiding this comment.
Both JSON configs have been moved to a new sibling directory Runner/suites/Multimedia/Video/Video_V4L2_config1/ which is outside the default CONFIG_PATH=./ scan of Video_V4L2_Runner.yaml. The runner's recursive find only descends into its own directory tree; Video_V4L2_config1/ is never touched by existing jobs. Each YAML references its config via CONFIG_PATH: "../Video_V4L2_config1/.json" (relative to Video_V4L2_Runner/ where run.steps cd). VIDEO_POLICY_SCOPE is set to all in both YAMLs so the Shikra Level 4.0 policy is applied to these opt-in configs. Existing Video_V4L2_Runner.yaml jobs are unaffected and the config count remains 10.
| "PixelFormat": "QC08C", | ||
| "Width": 1920, | ||
| "Height": 1080, | ||
| "Outputpath": "/usr/v4l2/output/20202142_Enc_AVC_CAM_High_1920_1080.264", |
There was a problem hiding this comment.
Please complete the media-path contract for these standalone definitions. Both hardcode input clips under /usr/v4l2, but their explicit --config calls disable the runner's automatic clip fetch. The encoder also writes under /usr/v4l2/output, which neither definition creates. With VIDEO_VERIFY=off, the shared runner does not relocate that output, and the public tool's setDump() directly opens it without creating its parent. Pre-staging the input alone therefore does not make this executable on an image without that writable output directory.
Use an output path under the test's CWD and expose a usable input provision/override path. For local bundles, reuse the existing --clips-tar/--clips-dest support rather than adding another fetch implementation. If manual pre-staging remains the contract, document the exact clips and launch steps briefly, and handle absent optional media as SKIP in the new opt-in path without weakening genuine codec failures.
There was a problem hiding this comment.
The encoder Outputpath has been changed to "../Video_V4L2_config1/H264_Record_QC08C_SingleSlice_1920x1080.264" — a path relative to the runner's CWD (Video_V4L2_Runner/) that resolves to the sibling Video_V4L2_config1/ directory, which is always present in the checkout. No directory creation is required. The input InputPath remains /usr/v4l2/input/1080p24_ParkScene_nv12_ubwc.yuv; manual pre-staging is the documented contract (stated in both YAML descriptions with the exact clip filename). Clip delivery via --clips-tar/--clips-dest is reusable if an automated bundle approach is adopted later. Verified on LeMans: the encoded bitstream H264_Record_QC08C_SingleSlice_1920x1080.264 (19MB) was written successfully.
There was a problem hiding this comment.
The relative output path and documented pre-staging address those parts. Missing optional input media still reaches the existing missing_case branch and records FAIL, so the new definitions fail on otherwise usable images without these clips. Please add an opt-in missing-media SKIP path for these configurations, preserving genuine codec failures and the existing default runner behavior across Yocto, Debian, Ubuntu and CentOS.
There was a problem hiding this comment.
Added --missing-media-skip flag to run.sh (default: MISSING_MEDIA_SKIP="0", preserving FAIL for all existing jobs). When set, the missing_case branch emits SKIP instead of FAIL and does not increment suite_rc, so codec-ready images without pre-staged clips are not penalised. Genuine codec failures (app crash, encode error, timeout) are unaffected — they occur after the clip check and continue to record FAIL. The flag is passed through build_reexec_args() for --stack both sub-runs. Both new YAMLs pass --missing-media-skip. Existing Video_V4L2_Runner.yaml jobs do not pass this flag and retain the existing FAIL behavior across Yocto, Debian, Ubuntu, and CentOS. Verified on LeMans: missing clip with flag → Video_V4L2_config1 SKIP; missing clip without flag → Video_V4L2_config1 FAIL.
| { | ||
| "Id": "MultiSliceMode", | ||
| "Vtype": "String", | ||
| "Value": "SINGLE" |
There was a problem hiding this comment.
This exercises single-slice encoding, despite the testcase name promising multislice coverage. In the public application's control mapping, SINGLE maps to V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE, while MAX_MB and MAX_BYTES select the multislice modes.
If multislice is the intended objective, select a supported multislice mode with its corresponding MaxMacroBlocksPerSlice or MaxBytesPerSlice limit and provide validation that multiple slices are produced. If single-slice encoding is intentional, please rename the JSON/YAML and testcase identity accordingly so a PASS does not overstate the coverage.
There was a problem hiding this comment.
Single-slice encoding is the intended objective for this test case (baseline functional validation). The JSON, YAML, and testcase identity have all been renamed from *Multislice* to *SingleSlice* to accurately reflect the coverage: H264_Record_QC08C_SingleSlice_1920x1080. The name now correctly maps to V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE. A separate multislice test case using MAX_MB or MAX_BYTES with MaxMacroBlocksPerSlice or MaxBytesPerSlice can be added in a follow-up PR.
e7f596c to
b69bef0
Compare
|
Hi Srikanth Muppandam (@smuppand)
Tested on LeMans (iq-9075-evk), upstream |
| # --- Result identity override --- | ||
| --testname) | ||
| shift | ||
| TESTNAME="$1" |
There was a problem hiding this comment.
Please keep the result identity separate from directory selection. Assigning TESTNAME here also changes find_test_case_by_name() at line 432, so these YAMLs move execution into Video_V4L2_config1, which has no run.sh. Selecting the advertised --stack both then tries to execute ./run.sh from that directory and fails before either codec run. Keep the runner/config working-directory contract independent of --testname, use the absolute runner path for re-execution, and validate the supplied name with test_result_valid_name() from functestlib.sh.
There was a problem hiding this comment.
Fixed. --testname no longer assigns to TESTNAME. A separate RESULT_ID variable is introduced; --testname sets RESULT_ID only. TESTNAME remains hardcoded as "Video_V4L2_Runner" and continues to control find_test_case_by_name(), log directory naming (logs_Video_V4L2_Runner/), and the --stack both re-execution path ('$0' is always the absolute runner path). RESULT_ID defaults to TESTNAME when not supplied, so existing behavior is preserved. All .res writes (early exits, --stack both verdict, final PASS/FAIL/SKIP) use RESULT_ID. RESULT_ID is validated against test_result_valid_name() when available in functestlib.sh; an inline character check (A-Za-z0-9_.:-) is used as fallback. Verified on LeMans: log header shows Starting Video_V4L2_Runner (modular), logs written to logs_Video_V4L2_Runner/, .res written to Video_V4L2_Runner/Video_V4L2_config1.res with correct identity.
b69bef0 to
6a5b731
Compare
|
Hi Srikanth Muppandam (@smuppand) ,
Tested scenarios: PASS with clip present, SKIP with clip absent (--missing-media-skip), FAIL without flag, send-to-lava.sh absent-file guard, mismatched-ID guard, SKIP signal guard. All behaved as expected. |
|
|
||
| # Use an absolute path so all early-exit paths (before cd test_path) and the | ||
| # final PASS/FAIL path (after cd test_path) all write to the same file. | ||
| RES_FILE="$(pwd)/${RESULT_ID}.res" |
There was a problem hiding this comment.
The result filename now follows RESULT_ID, but the early exits still write TESTNAME. For example, with --testname Video_V4L2_config1, an absent optional binary writes Video_V4L2_Runner SKIP into Video_V4L2_config1.res. The new strict publisher rejects that identity, so the intended video SKIP is not published. Keep TESTNAME for directory selection, but use RESULT_ID in every verdict write, including dependency, verification, stack-validation and empty-config exits.
| fi | ||
|
|
||
| printf '%s\n' "$TESTNAME PASS" > "$RES_FILE" | ||
| printf '%s\n' "$RESULT_ID PASS" > "$RES_FILE" |
There was a problem hiding this comment.
With the new --missing-media-skip option and --stack both, absent clips make both child runs write SKIP and exit zero. This branch then writes PASS although neither codec test ran. Aggregate the recorded child verdicts: both SKIP must remain SKIP, any FAIL or missing/invalid result must fail, and PASS must require an executed passing case.
There was a problem hiding this comment.
The early result identities and SKIP/SKIP case are now fixed. The PASS branch still accepts PASS with FAIL, missing or invalid child evidence when both exit codes are zero, so validate each fresh child result and identity, then allow PASS only for PASS/PASS, PASS/SKIP or SKIP/PASS.
There was a problem hiding this comment.
Added _validate_child_result() that rejects any child result that: has wrong number of fields, has a first field that does not match RESULT_ID, or has an unknown verdict. Anything missing, malformed, or with a wrong identity is treated as FAIL (conservative). PASS is now only written for the three combinations Srikanth listed: PASS/PASS, PASS/SKIP, SKIP/PASS. All other combinations (FAIL/anything, FAIL/SKIP, missing/anything) produce FAIL. Additionally, a non-zero child exit code always overrides the validated verdict to FAIL regardless of .res content. Verified on LeMans: --stack both with SKIP/FAIL (base upstream SKIP, overlay downstream FAIL due to missing iris_vpu) correctly produces Video_V4L2_config1 FAIL — log shows [both] child verdicts: base=SKIP overlay=FAIL.
6a5b731 to
d629e67
Compare
|
Hi Srikanth Muppandam (@smuppand) , |
|
|
||
| # Use an absolute path so all early-exit paths (before cd test_path) and the | ||
| # final PASS/FAIL path (after cd test_path) all write to the same file. | ||
| RES_FILE="$(pwd)/${RESULT_ID}.res" |
There was a problem hiding this comment.
With --stack both launched from another directory, the parent reads this caller-CWD result while its children write in the suite directory after cd. This can turn two child PASS results into FAIL, or reuse an old caller PASS when both children SKIP, so pass explicit child result destinations and initialize each before execution.
There was a problem hiding this comment.
Added --result-file PATH flag (RESULT_FILE_OVERRIDE). When set, it overrides
completes.
d629e67 to
a9cd974
Compare
|
Hi Srikanth Muppandam (@smuppand) , 2.Explicit child destinations__ — --result-file PATH added; --stack both creates dedicated pre-initialized temp files per child, placed in the same directory as the parent's result file. Children no longer share a single file, stale data cannot be re-read, and CWD differences between parent and children are eliminated. |
| log_info "[both] starting BASE (upstream) pass" | ||
| # shellcheck disable=SC2086 | ||
| sh -c "'$0' --stack base --log-flavor upstream $reexec_args" | ||
| sh -c "'$0' --stack base --log-flavor upstream --result-file '$_base_res' $reexec_args" |
There was a problem hiding this comment.
A caller/result directory containing an apostrophe breaks both child launches with Unterminated quoted string, because the new result paths are inserted unescaped into sh -c. Pass both paths as shell positional arguments, or apply the same single-quote escaping used for other string arguments in build_reexec_args().
There was a problem hiding this comment.
Applied the same single-quote escaping used throughout build_reexec_args() — sed "s/'/'\\''/g" — to both $_base_res and $_overlay_res before inserting them into the sh -c '...' string. The escaped values are stored in _esc_base_res and _esc_overlay_res and used in the child launch lines. Without this, a directory path containing an apostrophe (e.g. /some/dir's/) would break the child shell with "Unterminated quoted string" before either codec run executes. Verified on LeMans: --stack upstream with --testname "Video_V4L2_config1" → Video_V4L2_config1 PASS.
| # Validate each child result: must have exactly 2 fields, first field must | ||
| # match RESULT_ID, second field must be PASS/FAIL/SKIP. Anything missing, | ||
| # malformed, or with a wrong identity is treated as FAIL (conservative). | ||
| _validate_child_result() { |
There was a problem hiding this comment.
Please place this generic child-result validation in functestlib.sh as a reusable reader, keeping video sequencing and aggregation in run.sh. Follow the repository's multiline shell style and use descriptive helper/variable names without leading underscores.
There was a problem hiding this comment.
The inline validate_child_result() function has been removed from run.sh and replaced with a new result_read_verdict function added to functestlib.sh. The function follows the repository's multiline shell style: descriptive rrv-prefixed local variables (no leading underscores), block-style case with one token per line, documented with an inputs/output/returns comment header. run.sh calls result_read_verdict "$_base_res" "$RESULT_ID" and result_read_verdict "$_overlay_res" "$RESULT_ID" before rm -f so the files are still readable when validated. Video sequencing and aggregation logic remain in run.sh only. Verified on device: result_read_verdict correctly returns PASS for a matching identity+verdict, FAIL for a wrong identity, and FAIL for an empty file.
Signed-off-by: VMADIRED <vmadired@qti.qualcomm.com>
a9cd974 to
277ee40
Compare
|
Hi Srikanth Muppandam (@smuppand) ,
|
Srikanth Muppandam (smuppand)
left a comment
There was a problem hiding this comment.
Please split 277ee40 into functestlib: add validated result verdict reader, followed by test(video): add opt-in QC08C H264 encode and decode tests. Keep a sign-off on each so the shared helper and its consumers remain separately reviewable.
| # Existing jobs that do not pass --testname still get Video_V4L2_Runner.res. | ||
| # --missing-media-skip: missing clips → SKIP instead of FAIL on images that | ||
| # never pre-staged these opt-in clips, without weakening genuine codec FAILures. | ||
| - VIDEO_POLICY_SCOPE="${VIDEO_POLICY_SCOPE}" VIDEO_VERIFY="${VIDEO_VERIFY}" VIDEO_MIN_PSNR="${VIDEO_MIN_PSNR}" ./run.sh --app "${APP_PATH}" --config "${CONFIG_PATH}" --platform "${PLATFORM}" --stack "${VIDEO_STACK}" --loglevel "${LOGLEVEL}" --retry-on-fail "${RETRY_ON_FAIL}" --post-test-sleep "${POST_TEST_SLEEP}" --testname "Video_V4L2_config1" --missing-media-skip || true |
There was a problem hiding this comment.
Both new YAMLs reuse Video_V4L2_config1.res without clearing it, so a run that exits before writing a verdict can publish the previous PASS through || true. Clear the file before each launch, and call test_result_init in the runner once RESULT_ID and RES_FILE are resolved.
Hi Srikanth Muppandam (@smuppand)
This PR introduces individual per-testcase JSON configuration files and corresponding LAVA YAML test definitions for V4L2 video encode and decode validation using iris_v4l2_test on Qualcomm Linux platforms. Two test cases are added: an H264 AVC encoder test (H264_Record_QC08C_Multislice_1920x1080) configured for QC08C pixel format at 1920x1080 resolution with HIGH profile, VBR 20Mbps, and MultiSlice SINGLE mode, and an H264 AVC decoder test (QC08C_H264_Non_secure_Playback) for non-secure playback at 352x288 resolution. Each YAML follows the same execution pattern as the existing Video_V4L2_Runner.yaml but targets a single specific config, enabling per-testcase CI triggering and result tracking. The CONFIG_PATH is prefixed with ./ to correctly resolve the config as a file path in iris_v4l2_test (bare filenames cause a SIGABRT). VIDEO_POLICY_SCOPE is set to all so Shikra platform policies such as the Level 4.0 cap are applied to these custom configs. Input clips must be pre-staged to /usr/v4l2/ on the device; the approach for automated clip delivery is open for discussion.
The current approach adds one JSON + one YAML per test case directly under Video_V4L2_Runner/. This keeps each test self-contained and independently triggerable in LAVA. However, as the number of test cases grows this could result in a large number of files in a single directory. An alternative design would be to keep all JSON configs in the existing directory and reference them from a higher-level plan YAML (similar to how video_pre-merge.yaml under Runner/plans/ already aggregates suites), letting the plan control which test cases run per pipeline. We are seeking reviewer input on which approach better fits the project's CI and maintenance model before scaling up with more test cases.