--- zzzz-none-000/linux-5.4.213/tools/testing/selftests/pstore/common_tests 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/tools/testing/selftests/pstore/common_tests 2024-08-14 09:02:22.000000000 +0000 @@ -27,9 +27,9 @@ } check_files_exist() { # type of pstorefs file - if [ -e ${1}-${backend}-0 ]; then + if [ -e ${1}0 ]; then prlog "ok" - for f in `ls ${1}-${backend}-*`; do + for f in `ls ${1}*`; do prlog -e "\t${f}" done else @@ -52,6 +52,23 @@ rc=1 fi } + +check_pmsg_content() { # pmsg filename + prev_uuid=`cat $TOP_DIR/prev_uuid` + if [ $? -eq 0 ]; then + nr_matched=`grep -c "$TEST_STRING_PATTERN" $1` + if [ "$nr_matched" = "1" ]; then + grep -q "$TEST_STRING_PATTERN"$prev_uuid $1 + show_result $? + else + prlog "FAIL" + rc=1 + fi + else + prlog "FAIL" + rc=1 + fi +} # Parameters TEST_STRING_PATTERN="Testing pstore: uuid="