Skip to content

Add individual test definitions#207

Merged
smuppand merged 5 commits intoqualcomm-linux:mainfrom
mwasilew:individual-test-definitions
Dec 9, 2025
Merged

Add individual test definitions#207
smuppand merged 5 commits intoqualcomm-linux:mainfrom
mwasilew:individual-test-definitions

Conversation

@mwasilew
Copy link
Contributor

@mwasilew mwasilew commented Nov 3, 2025

Individual test definitions are meant to be used for debugging the test scripts running in LAVA.

@mwasilew mwasilew changed the title Add individual test definitions WIP: Add individual test definitions Nov 3, 2025
@mwasilew mwasilew force-pushed the individual-test-definitions branch from 9b6f269 to c712c5c Compare November 28, 2025 13:24
@mwasilew mwasilew force-pushed the individual-test-definitions branch 27 times, most recently from c967ff6 to 409519b Compare December 1, 2025 09:32
@mwasilew mwasilew force-pushed the individual-test-definitions branch 3 times, most recently from 5eccc0f to cad2f3e Compare December 1, 2025 20:03
Copy link
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.

LGTM apart from the typo

scope:
- functional

parames:
Copy link
Contributor

Choose a reason for hiding this comment

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

likely typo instead of params

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch. Thanks!

@mwasilew mwasilew force-pushed the individual-test-definitions branch from cad2f3e to 9bb35a6 Compare December 4, 2025 10:45
@mwasilew mwasilew changed the title WIP: Add individual test definitions Add individual test definitions Dec 4, 2025
@mwasilew mwasilew force-pushed the individual-test-definitions branch from 9bb35a6 to bef7ce8 Compare December 4, 2025 10:47
@mwasilew
Copy link
Contributor Author

mwasilew commented Dec 4, 2025

I split the big commit into smaller chunks that address individual issues. It's ready for review now

log_info "Writing to file $RES_FILE"
echo "$TESTNAME PASS" >"$RES_FILE"
else
log_fail "$TESTNAME PASS"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should display as FAIL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

[ -n "$MODPATH" ] || log_fail "$MODNAME.ko not found in filesystem"
load_kernel_module "$MODPATH" || log_fail "Failed to load $MODNAME"
[ -n "$MODPATH" ] || (log_fail "$MODNAME.ko not found in filesystem"; echo "$TESTNAME FAIL" >"$RES_FILE")
load_kernel_module "$MODPATH" || (log_fail "Failed to load $MODNAME"; echo "$TESTNAME FAIL" >"$RES_FILE")
Copy link
Contributor

Choose a reason for hiding this comment

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

possible for us to keep multiple lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do you mean to reformat subshell?

@smuppand
Copy link
Contributor

smuppand commented Dec 4, 2025

@mwasilew Does Lava YAML follow any strict linting rules?

@mwasilew mwasilew force-pushed the individual-test-definitions branch from bef7ce8 to 50794b4 Compare December 5, 2025 09:27
@mwasilew
Copy link
Contributor Author

mwasilew commented Dec 5, 2025

@mwasilew Does Lava YAML follow any strict linting rules?

yes, kind of. There is no enforcement in LAVA itself. In test-definitions there is this script: https://github.com/Linaro/test-definitions/blob/master/validate.py#L96. It's probably a bit too strict for the test definitions in this repository. I can add something similar if you would like.

@smuppand
Copy link
Contributor

smuppand commented Dec 5, 2025

@mwasilew Does Lava YAML follow any strict linting rules?

yes, kind of. There is no enforcement in LAVA itself. In test-definitions there is this script: https://github.com/Linaro/test-definitions/blob/master/validate.py#L96. It's probably a bit too strict for the test definitions in this repository. I can add something similar if you would like.

Thanks. Yes, it may be needed once this PR is merged. At least having the basic structure that the lava test-definition expects would be a good sanity check.

@mwasilew
Copy link
Contributor Author

mwasilew commented Dec 5, 2025

OK, I'll propose a test-definition check workflow in a separate PR.

Copy link
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.

There are a few minor updates to the video yaml.


params:
APP_PATH: "/usr/bin/iris_v4l2_test"
CONFIG_PATH: "./h264Decoder.json"
Copy link
Contributor

Choose a reason for hiding this comment

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

CONFIG_PATH can refer to CWD, and the script will process all *.json files within it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, so if I leave it with "./" it will run use all JSON files?

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, so if I leave it with "./" it will run use all JSON files?

Yes, this should be fine.

params:
APP_PATH: "/usr/bin/iris_v4l2_test"
CONFIG_PATH: "./h264Decoder.json"
PLATFORM: "kodiak"
Copy link
Contributor

Choose a reason for hiding this comment

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

This field can remain blank since we automatically detect the platform and apply the required configurations. Otherwise, the target name must be provided from the lava job.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ACK. I'll leave it blank and add the comments to explain.

Copy link
Contributor

Choose a reason for hiding this comment

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

ACK. I'll leave it blank and add the comments to explain.

Yes, this should be fine.

@mwasilew mwasilew force-pushed the individual-test-definitions branch from 50794b4 to 7902117 Compare December 5, 2025 11:43
When saving LAVA results logfile is sometimes in a wrong path. This
patch adds more logging to make sure results are written to the proper
file.

Signed-off-by: Milosz Wasilewski <milosz.wasilewski@oss.qualcomm.com>
Print debug log to stdout. This helps debugging issues when running
tests in LAVA as the debug log is saved to the LAVA job log.

Signed-off-by: Milosz Wasilewski <milosz.wasilewski@oss.qualcomm.com>
Save test result to the log file in case module is not found. This
condition was missing when running the test in LAVA.

Signed-off-by: Milosz Wasilewski <milosz.wasilewski@oss.qualcomm.com>
Save test result to the results file that is later exported in a LAVA
job. This feature was missing and when running a job in LAVA no results
were recorded.

Signed-off-by: Milosz Wasilewski <milosz.wasilewski@oss.qualcomm.com>
Add a test-definitions YAML file for each test script. This allows to
compose more flexible test plans and test each script separately in
LAVA.

Signed-off-by: Milosz Wasilewski <milosz.wasilewski@oss.qualcomm.com>
@mwasilew mwasilew force-pushed the individual-test-definitions branch from 7902117 to 65db227 Compare December 8, 2025 13:37
@mwasilew
Copy link
Contributor Author

mwasilew commented Dec 8, 2025

I rebased on top of main branch

Copy link
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.

LGTM

@smuppand smuppand merged commit e0c5e1b into qualcomm-linux:main Dec 9, 2025
8 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

Comments