Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ufs/tpmi_ufs.sh: Fix sysfs_verify to really test the path
The sysfs_verify function sets test type as "dir", "file" or "exist" from the parameter, but there is no code that really does the check. The test_print_trc function simply echoes a line no matter the path exists or not. This may cause some false test results such as: $ ls /sys/devices/system/cpu/intel_uncore_frequency/current_freq_khz ls: cannot access '/sys/devices/system/cpu/intel_uncore_frequency/current_freq_khz': No such file or directory $ sudo ./runtests -c "./ufs/tpmi_ufs.sh -t check_ufs_sysfs_attr" <<<test start - './ufs/tpmi_ufs.sh -t check_ufs_sysfs_attr'>> |0122_171944.874|TRACE|Check TPMI_UFS driver sysfs attribute:| |0122_171944.876|TRACE|/sys/devices/system/cpu/intel_uncore_frequency/current_freq_khz does exist| |0122_171944.879|TRACE|/sys/devices/system/cpu/intel_uncore_frequency/initial_max_freq_khz does exist| |0122_171944.881|TRACE|/sys/devices/system/cpu/intel_uncore_frequency/domain_id does exist| |0122_171944.883|TRACE|/sys/devices/system/cpu/intel_uncore_frequency/fabric_cluster_id does exist| |0122_171944.886|TRACE|/sys/devices/system/cpu/intel_uncore_frequency/initial_min_freq_khz does exist| |0122_171944.888|TRACE|/sys/devices/system/cpu/intel_uncore_frequency/max_freq_khz does exist| |0122_171944.891|TRACE|/sys/devices/system/cpu/intel_uncore_frequency/min_freq_khz does exist| |0122_171944.893|TRACE|/sys/devices/system/cpu/intel_uncore_frequency/package_id does exist| |0122_171944.899|TRACE|package_00_die_00| <<<test end, result: PASS, duration: 0.057>> Test Start Time: 2024-01-22_17-19-44 -------------------------------------------------------- Testcase Result Exit Value Duration -------- ------ ---------- -------- [RESULT][./ufs/tpmi_ufs.sh -t check_ufs_sysfs_attr] [PASS] [0] [0.057s] -------------------------------------------------------- Reported-by: kernel test robot <[email protected]> Signed-off-by: Yujie Liu <[email protected]>
- Loading branch information