mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
selftests/efivarfs: add empty file creation test
Signed-off-by: Jeremy 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
455ce1c721
commit
033a1a7fe7
1 changed files with 13 additions and 0 deletions
|
@ -58,6 +58,18 @@ test_create()
|
|||
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()
|
||||
{
|
||||
local attrs='\x07\x00\x00\x00'
|
||||
|
@ -112,6 +124,7 @@ check_prereqs
|
|||
rc=0
|
||||
|
||||
run_test test_create
|
||||
run_test test_create_empty
|
||||
run_test test_delete
|
||||
run_test test_zero_size_delete
|
||||
run_test test_open_unlink
|
||||
|
|
Loading…
Reference in a new issue