projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a7dc82
)
selftests: efivarfs: remove the test_create_read file if it was exist
author
ZhangXiaoxu
<zhangxiaoxu5@huawei.com>
Tue, 19 Mar 2019 03:24:31 +0000
(11:24 +0800)
committer
Shuah Khan
<shuah@kernel.org>
Mon, 8 Apr 2019 22:44:21 +0000
(16:44 -0600)
After the first run, the test case 'test_create_read' will always
fail because the file is exist and file's attr is 'S_IMMUTABLE',
open with 'O_RDWR' will always return -EPERM.
Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Shuah Khan <shuah@kernel.org>
tools/testing/selftests/efivarfs/efivarfs.sh
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/efivarfs/efivarfs.sh
b/tools/testing/selftests/efivarfs/efivarfs.sh
index
a47029a
..
d386610
100755
(executable)
--- a/
tools/testing/selftests/efivarfs/efivarfs.sh
+++ b/
tools/testing/selftests/efivarfs/efivarfs.sh
@@
-77,6
+77,10
@@
test_create_empty()
test_create_read()
{
local file=$efivarfs_mount/$FUNCNAME-$test_guid
+ if [ -f $file]; then
+ chattr -i $file
+ rm -rf $file
+ fi
./create-read $file
}