aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/efivarfs/efivarfs.sh
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-03-21 10:08:20 +0800
committerAlex Shi <alex.shi@linaro.org>2016-03-21 10:08:20 +0800
commit8cea869f71490e9e08b53e34dec030da2518bb3e (patch)
tree70f29f8bb38cf5218bac5e64931912ce1a7476cd /tools/testing/selftests/efivarfs/efivarfs.sh
parent5af6a242945e39bf6ea39716d4eba316b735dce8 (diff)
parent70e00db9eb8ffc4dcaf5f035ec6a4440ba428794 (diff)
Merge branch 'linux-linaro-lsk-v3.14' into linux-linaro-lsk-v3.14-androidlsk-v3.14-16.03-androidlinux-linaro-lsk-v3.14-android
Diffstat (limited to 'tools/testing/selftests/efivarfs/efivarfs.sh')
-rw-r--r--tools/testing/selftests/efivarfs/efivarfs.sh19
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 100644
--- 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