diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-02 01:38:16 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-02 01:38:16 +0100 |
commit | 523462df282fc527a01bceca5125017e2259fbf5 (patch) | |
tree | b3cca26b719ce1f46f203e2f86334525a2f50e14 /tools/testing/selftests/efivarfs/efivarfs.sh | |
parent | mei: fix format string in debug prints (diff) | |
parent | Linux 4.5-rc6 (diff) | |
download | linux-523462df282fc527a01bceca5125017e2259fbf5.tar.xz linux-523462df282fc527a01bceca5125017e2259fbf5.zip |
Merge 4.5-rc6 into char-misc-next
We want the fixes in here, and others are sending us pull requests based
on this kernel tree.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/efivarfs/efivarfs.sh')
-rwxr-xr-x | tools/testing/selftests/efivarfs/efivarfs.sh | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/tools/testing/selftests/efivarfs/efivarfs.sh b/tools/testing/selftests/efivarfs/efivarfs.sh index 77edcdcc016b..057278448515 100755 --- a/tools/testing/selftests/efivarfs/efivarfs.sh +++ b/tools/testing/selftests/efivarfs/efivarfs.sh @@ -88,7 +88,11 @@ test_delete() exit 1 fi - rm $file + rm $file 2>/dev/null + if [ $? -ne 0 ]; then + chattr -i $file + rm $file + fi if [ -e $file ]; then echo "$file couldn't be deleted" >&2 @@ -111,6 +115,7 @@ test_zero_size_delete() exit 1 fi + chattr -i $file printf "$attrs" > $file if [ -e $file ]; then @@ -141,7 +146,11 @@ test_valid_filenames() echo "$file could not be created" >&2 ret=1 else - rm $file + rm $file 2>/dev/null + if [ $? -ne 0 ]; then + chattr -i $file + rm $file + fi fi done @@ -174,7 +183,11 @@ test_invalid_filenames() if [ -e $file ]; then echo "Creating $file should have failed" >&2 - rm $file + rm $file 2>/dev/null + if [ $? -ne 0 ]; then + chattr -i $file + rm $file + fi ret=1 fi done |