diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-04-21 14:42:15 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-04-21 14:42:15 +0800 |
commit | fd9302c16fc244139c1ddfdffc145d5b772ed9ce (patch) | |
tree | 40270feadd63149bcd43380cf3fe402a2dcd85ad /tools/testing/selftests/efivarfs/efivarfs.sh | |
parent | 9b17ba5e21b99587d7c54250059cf10fd51c74f2 (diff) | |
parent | 6fe78bc1bfcddabbf3d210e18f91da44fa796d8a (diff) |
Merge remote-tracking branch 'lts/linux-4.1.y' into linux-linaro-lsk-v4.1lsk-v4.1-16.04
Conflicts:
arch/arm/include/asm/psci.h
mm/memcontrol.c
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 |