Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jeremy Kerr and committed by
Linus Torvalds
033a1a7f 455ce1c7

+13
+13
tools/testing/selftests/efivarfs/efivarfs.sh
··· 58 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 73 test_delete() 62 74 { 63 75 local attrs='\x07\x00\x00\x00' ··· 124 112 rc=0 125 113 126 114 run_test test_create 115 + run_test test_create_empty 127 116 run_test test_delete 128 117 run_test test_zero_size_delete 129 118 run_test test_open_unlink