Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8a0590f authored by ZhangXiaoxu's avatar ZhangXiaoxu Committed by Shuah Khan
Browse files

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: default avatarZhangXiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: default avatarShuah Khan <shuah@kernel.org>
parent 0a7dc82e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
}