Skip to content

Conversation

smuppand
Copy link
Contributor

This PR introduces the following improvements across UFS and eMMC validation scripts:

Enhancements:

  • Refactored scan_dmesg_errors() in [functestlib.sh](http://functestlib.sh/) to:

    • Limit dmesg search scope to 300 recent lines
    • Filter only lines containing a user-defined keyword (e.g., "ufs", "mmc", "bt") to avoid false positives
    • Preserve both snapshot and filtered logs for debugging
  • Updated run.sh scripts for UFS and eMMC to:

    • Adopt the improved scan_dmesg_errors() API
    • Use find instead of ls to comply with SC2012
    • Clean up unused variables and conditional logic to resolve SC2034
    • Ensure rootfs protection logic is more portable and fallback-friendly
    • Improve BusyBox/dd compatibility checks

…hellCheck fixes from UFS/eMMC run.sh scripts

This change improves the scan_dmesg_errors() function to:
- Filter dmesg errors based on a scoped keyword (e.g., 'ufs', 'mmc', 'bt')
- Reduce false positives by narrowing context to relevant lines
- Log both raw snapshot and filtered messages for traceability

Also addressed ShellCheck warnings across the UFS/eMMC run.sh scripts:
- SC2012: Replaced ls with find for safer handling of filenames
- SC2034: Removed or justified unused variable assignments

Signed-off-by: Srikanth Muppandam <[email protected]>
@smuppand smuppand requested a review from vnarapar July 11, 2025 09:28
Copy link
Contributor

@vnarapar vnarapar left a comment

Choose a reason for hiding this comment

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

LGTM. Ignoring shell check error as there is an issue

@vnarapar vnarapar merged commit 529677e into qualcomm-linux:main Jul 14, 2025
6 of 9 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