Skip to content

Commit

Permalink
check-suspend-resume: fix rtcwake error handling bug
Browse files Browse the repository at this point in the history
To help with thesofproject#312, commit 2e24024 ("test-case: add set -e to 7
function test") blindly added "set -e" without reviewing the code of any
test and without making sure it's actually compatible with set -e. In
this test this meant missing the rtcwake exit code.

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb committed May 2, 2022
1 parent 27ae328 commit fe281cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test-case/check-suspend-resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ do
setup_kernel_check_point
sleep_count=$(cat /sys/power/wakeup_count)
dlogc "Run the command: rtcwake -m mem -s ${sleep_lst[$i]}"
sudo rtcwake -m mem -s ${sleep_lst[$i]}
[[ $? -ne 0 ]] && die "rtcwake return value error"
sudo rtcwake -m mem -s "${sleep_lst[$i]}" ||
die "rtcwake returned $?"
dlogc "sleep for ${wait_lst[$i]}"
sleep ${wait_lst[$i]}
dlogi "Check for the kernel log status"
Expand Down

0 comments on commit fe281cb

Please sign in to comment.