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

selftests/efivarfs: Add checking of the test return value

Add checking of the test return value, otherwise it will report success
forever for test_create_read().

Fixes: dff6d2ae56d0 ("selftests/efivarfs: clean up test files from test_create*()")
Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Zhao Gongyi and committed by
Shuah Khan
c9392426 2dfb010d

+5
+5
tools/testing/selftests/efivarfs/efivarfs.sh
··· 87 87 { 88 88 local file=$efivarfs_mount/$FUNCNAME-$test_guid 89 89 ./create-read $file 90 + if [ $? -ne 0 ]; then 91 + echo "create and read $file failed" 92 + file_cleanup $file 93 + exit 1 94 + fi 90 95 file_cleanup $file 91 96 } 92 97