Commit 033a1a7f authored by Jeremy Kerr's avatar Jeremy Kerr Committed by Linus Torvalds

selftests/efivarfs: add empty file creation test

Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Lingzhu Xiang <lxiang@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 455ce1c7
...@@ -58,6 +58,18 @@ test_create() ...@@ -58,6 +58,18 @@ test_create()
fi fi
} }
test_create_empty()
{
local file=$efivarfs_mount/$FUNCNAME-$test_guid
: > $file
if [ ! -e $file ]; then
echo "$file can not be created without writing" >&2
exit 1
fi
}
test_delete() test_delete()
{ {
local attrs='\x07\x00\x00\x00' local attrs='\x07\x00\x00\x00'
...@@ -112,6 +124,7 @@ check_prereqs ...@@ -112,6 +124,7 @@ check_prereqs
rc=0 rc=0
run_test test_create run_test test_create
run_test test_create_empty
run_test test_delete run_test test_delete
run_test test_zero_size_delete run_test test_zero_size_delete
run_test test_open_unlink run_test test_open_unlink
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment