mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 09:46:50 +07:00
selftests: efivarfs: remove the test_create_read file if it was exist
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>
This commit is contained in:
parent
0a7dc82ef2
commit
f8a0590f0e
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user