selftests/efivarfs: Add checking of the test return value
[ Upstream commit c93924267fe6f2b44af1849f714ae9cd8117a9cd ]
Add checking of the test return value, otherwise it will report success
forever for test_create_read().
Fixes: dff6d2ae56
("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
911773f08c
commit
e1049bf0ca
@@ -87,6 +87,11 @@ test_create_read()
|
|||||||
{
|
{
|
||||||
local file=$efivarfs_mount/$FUNCNAME-$test_guid
|
local file=$efivarfs_mount/$FUNCNAME-$test_guid
|
||||||
./create-read $file
|
./create-read $file
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "create and read $file failed"
|
||||||
|
file_cleanup $file
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
file_cleanup $file
|
file_cleanup $file
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user