Various suspend/resume fixes#899
Conversation
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 <marc.herbert@intel.com>
Replace with a simpler and safer grep -q. No functional change. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
… sudo Remove the dependency on hijack.sh#sudo() and simplify the multiple layers of quoting. Fixes the following error when running with plain sudo: bash: echo deep > /sys/power/mem_sleep: No such file or directory Signed-off-by: Marc Herbert <marc.herbert@intel.com>
We should never pass an invalid argument. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
shellcheck source and BASH_SOURCE quoting Signed-off-by: Marc Herbert <marc.herbert@intel.com>
|
None of the two errors in https://sof-ci.01.org/softestpr/PR899/build15/devicetest/ are new. |
paulstelian97
left a comment
There was a problem hiding this comment.
I like this for the most part, the fact that the new code is more readable (on one of the commits I didn't understand the old code but I kinda do the new one, so I leave it to you to confirm that functionality doesn't really change) is a good thing.
Just one comment that I want to get clarified.
| grep -q "$type" /sys/power/mem_sleep || { | ||
| grep -H '^' /sys/power/mem_sleep | ||
| skip_test "Unsupported sleep type argument: $type" | ||
| die "Unsupported sleep type argument: $type" |
There was a problem hiding this comment.
Two changes on the same thing? Feels odd but okay...
There was a problem hiding this comment.
The first commit here is a no-change cleanup that will stay. The second one switches the SKIP to a FAIL, it could be reverted if it is found to break "backwards compatibility" somewhere.
There was a problem hiding this comment.
What does the following line do here?
grep -H '^' /sys/power/mem_sleep
There was a problem hiding this comment.
It's just a very fancy cat; try it on any file and you will see every line is prefixed by the file name.
| grep -q "$type" /sys/power/mem_sleep || { | ||
| grep -H '^' /sys/power/mem_sleep | ||
| skip_test "Unsupported sleep type argument: $type" | ||
| die "Unsupported sleep type argument: $type" |
There was a problem hiding this comment.
What does the following line do here?
grep -H '^' /sys/power/mem_sleep
|
Thanks @greg-intel . Very small code changes with almost no functional change, very easily reverted if needed -> merging. |
|
|
See commit messages.