Skip to content

Conversation

@jeevanandan-sandan
Copy link

No description provided.

Signed-off-by: Jeevanandan Sandan <sandanka@qti.qualcomm.com>
@jeevanandan-sandan jeevanandan-sandan force-pushed the feature/storage_test_automation branch from c1f2b5b to 68e6860 Compare November 28, 2025 11:27
@vnarapar
Copy link
Contributor

vnarapar commented Dec 1, 2025

Please add commit messages

@vnarapar vnarapar requested review from smuppand and vnarapar and removed request for vnarapar December 1, 2025 09:29
@vnarapar
Copy link
Contributor

vnarapar commented Dec 2, 2025

Ensure the script has execute permissions

Signed-off-by: Jeevanandan Sandan <sandanka@qti.qualcomm.com>
@jeevanandan-sandan jeevanandan-sandan force-pushed the feature/storage_test_automation branch from 76dc353 to ce6cfca Compare December 2, 2025 09:54
@vnarapar
Copy link
Contributor

vnarapar commented Dec 2, 2025

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

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?

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.

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

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"
Copy link
Contributor

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

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

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"
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

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() {
Copy link
Contributor

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

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.

3 participants