Skip to content

Commit

Permalink
selftests/efivarfs: Add checking of the test return value
Browse files Browse the repository at this point in the history
[ Upstream commit c939242 ]

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

Fixes: dff6d2a ("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>
  • Loading branch information
zhaogongyi authored and gregkh committed Dec 31, 2022
1 parent 46be3ee commit f1c7a6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/testing/selftests/efivarfs/efivarfs.sh
Expand Up @@ -87,6 +87,11 @@ test_create_read()
{
local file=$efivarfs_mount/$FUNCNAME-$test_guid
./create-read $file
if [ $? -ne 0 ]; then
echo "create and read $file failed"
file_cleanup $file
exit 1
fi
file_cleanup $file
}

Expand Down

0 comments on commit f1c7a6a

Please sign in to comment.