-
Notifications
You must be signed in to change notification settings - Fork 25
Added UFS functional tests #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Added UFS functional tests #220
Conversation
Signed-off-by: Jeevanandan Sandan <sandanka@qti.qualcomm.com>
c1f2b5b to
68e6860
Compare
|
Please add commit messages |
|
Ensure the script has execute permissions |
Signed-off-by: Jeevanandan Sandan <sandanka@qti.qualcomm.com>
76dc353 to
ce6cfca
Compare
|
Squash to single commit |
| - $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/Baseport/smmu/smmu.res || true | ||
| - $PWD/suites/Kernel/Baseport/Storage/UFS_Validation/run.sh || true | ||
| - $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/Baseport/Storage/UFS_Validation/UFS_Validation.res || true | ||
| - $PWD/suites/Kernel/Baseport/Storage/ufs_gear_lane/run.sh || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these tests validated on qcom-next?
smuppand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments apply to the other tests as well. Please also take care of the https://github.com/qualcomm-linux/qcom-linux-testkit/actions/runs/19762511972/job/56772745461.
| - $PWD/suites/Kernel/Baseport/Storage/ufs_runtime_suspend_resume/run.sh || true | ||
| - $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/Baseport/Storage/ufs_runtime_suspend_resume/ufs_runtime_suspend_resume.res || true | ||
| - $PWD/suites/Kernel/Baseport/Storage/ufs_write_booster/run.sh || true | ||
| - $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/Baseport/Storage/ufs_write_booster/ufs_write_booster.res || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest enabling these tests in qcom-next instead of meta-qcom.
| # Only source if not already loaded | ||
| if [ -z "$__INIT_ENV_LOADED" ]; then | ||
| # shellcheck disable=SC1090 | ||
| . "$INIT_ENV" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you never set __INIT_ENV_LOADED, so this guard is effectively useless if this script is ever sourced again.
| log_info "--------------------------------------------------" | ||
| log_info "------------- Starting $TESTNAME Test ------------" | ||
|
|
||
| check_dependencies dd grep cut head tail udevadm sleep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cut, head, tail, udevadm are not used anywhere in this script. You do use findmnt and awk, and rely on readlink (though that's almost always present)
| OPTIONAL_CONFIGS="CONFIG_SCSI_UFSHCD_PLATFORM CONFIG_SCSI_UFSHCD_PCI CONFIG_SCSI_UFS_CDNS_PLATFORM CONFIG_SCSI_UFS_HISI CONFIG_SCSI_UFS_EXYNOS CONFIG_SCSI_UFS_ROCKCHIP CONFIG_SCSI_UFS_BSG" | ||
|
|
||
| log_info "Checking mandatory kernel configs for UFS..." | ||
| if ! check_kernel_config "$MANDATORY_CONFIGS" 2>/dev/null; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"$MANDATORY_CONFIGS" is one arugment with a space inside, not two config names. That'll fail.
| [ -n "$missing_optional" ] && log_info "Optional configs not present but continuing:$missing_optional" | ||
|
|
||
| check_dt_nodes "/sys/bus/platform/devices/*ufs*" || { | ||
| echo "$TESTNAME SKIP" > "$res_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include log_skip so it is visible to the user.
| log_pass "UFS Gear and Lane validation passed" | ||
| log_info "Gear: $CURRENT_GEAR (Expected: HS_GEAR$EXPECTED_GEAR)" | ||
| log_info "Lane: $CURRENT_LANE (Expected: 2)" | ||
| scan_dmesg_errors "ufs" "$test_path" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Called twice on the PASS path
| exit 1 | ||
| fi | ||
|
|
||
| scan_dmesg_errors "ufs" "$test_path" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT
| log_info "Gear: $CURRENT_GEAR (Expected: HS_GEAR$EXPECTED_GEAR)" | ||
| log_info "Lane: $CURRENT_LANE (Expected: 2)" | ||
| scan_dmesg_errors "ufs" "$test_path" | ||
| echo "$TESTNAME PASS" > "$res_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.res file is written PASS twice
|
|
||
| scan_dmesg_errors "ufs" "$test_path" | ||
| log_pass "$TESTNAME completed successfully" | ||
| echo "$TESTNAME PASS" > "$res_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT
| fi | ||
|
|
||
| # Function to get the first matching node path | ||
| get_dt_node_path() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use already available functions from functestlib.sh
No description provided.