Skip to content

Commit

Permalink
selftests/efivarfs: add empty file creation test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Kerr authored and Linus Torvalds committed Feb 28, 2013
1 parent 455ce1c commit 033a1a7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/testing/selftests/efivarfs/efivarfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 033a1a7

Please sign in to comment.