Skip to content

Commit

Permalink
selftests/efivarfs: fix tests for failed write removal
Browse files Browse the repository at this point in the history
The current self tests expect the zero size remnants that failed
variable creation leaves.  Update the tests to verify these are now
absent.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
  • Loading branch information
James Bottomley authored and Ard Biesheuvel committed Jan 19, 2025
1 parent e7b4b1f commit fd3aa3d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tools/testing/selftests/efivarfs/efivarfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ test_create_empty()

: > $file

if [ ! -e $file ]; then
echo "$file can not be created without writing" >&2
if [ -e $file ]; then
echo "$file can be created without writing" >&2
file_cleanup $file
exit 1
fi
file_cleanup $file
}

test_create_read()
Expand All @@ -89,10 +89,13 @@ test_create_read()
./create-read $file
if [ $? -ne 0 ]; then
echo "create and read $file failed"
exit 1
fi
if [ -e $file ]; then
echo "file still exists and should not"
file_cleanup $file
exit 1
fi
file_cleanup $file
}

test_delete()
Expand Down

0 comments on commit fd3aa3d

Please sign in to comment.