diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-02-27 20:05:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-27 22:10:24 -0500 |
commit | 033a1a7fe7e27b9320496ca7da6905a5f654a768 (patch) | |
tree | ad0ccdff073807fe010e6c43c21a18b57dcaef8d /tools | |
parent | 455ce1c721b1787e6695c535528034e9e7271f37 (diff) |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/efivarfs/efivarfs.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/testing/selftests/efivarfs/efivarfs.sh b/tools/testing/selftests/efivarfs/efivarfs.sh index e8c0d27b381b..3af4b370e70d 100644 --- a/tools/testing/selftests/efivarfs/efivarfs.sh +++ b/tools/testing/selftests/efivarfs/efivarfs.sh | |||
@@ -58,6 +58,18 @@ test_create() | |||
58 | fi | 58 | fi |
59 | } | 59 | } |
60 | 60 | ||
61 | test_create_empty() | ||
62 | { | ||
63 | local file=$efivarfs_mount/$FUNCNAME-$test_guid | ||
64 | |||
65 | : > $file | ||
66 | |||
67 | if [ ! -e $file ]; then | ||
68 | echo "$file can not be created without writing" >&2 | ||
69 | exit 1 | ||
70 | fi | ||
71 | } | ||
72 | |||
61 | test_delete() | 73 | test_delete() |
62 | { | 74 | { |
63 | local attrs='\x07\x00\x00\x00' | 75 | local attrs='\x07\x00\x00\x00' |
@@ -112,6 +124,7 @@ check_prereqs | |||
112 | rc=0 | 124 | rc=0 |
113 | 125 | ||
114 | run_test test_create | 126 | run_test test_create |
127 | run_test test_create_empty | ||
115 | run_test test_delete | 128 | run_test test_delete |
116 | run_test test_zero_size_delete | 129 | run_test test_zero_size_delete |
117 | run_test test_open_unlink | 130 | run_test test_open_unlink |