Skip to content

Commit a9602e9

Browse files
committed
Add more files to test
1 parent 08b0b1f commit a9602e9

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

test.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ truncate -s 8G disk.img
5050
mkfs.ext4 -F disk.img
5151
DEV=$(sudo losetup --show --find disk.img)
5252
sudo mount $DEV /mnt
53-
echo "hello world" | sudo tee /mnt/hello.txt
53+
echo "hello world" | sudo tee /mnt/hello.txt >/dev/null
54+
head -c 10M /dev/urandom | sudo tee /mnt/rand1 >/dev/null
55+
head -c 10M /dev/urandom | sudo tee /mnt/rand2 >/dev/null
56+
SHA_IN="$(sha256sum /mnt/*)"
5457
sudo umount /mnt
5558
sudo losetup -d $DEV
5659

@@ -65,8 +68,9 @@ run_qemu
6568

6669
DEV=$(sudo losetup --show --find disk.img)
6770
sudo mount $DEV /mnt
68-
if [ "$(cat /mnt/hello.txt)" != "hello world" ]; then
69-
echo "hello.txt does not contain the expected content"
71+
SHA_OUT="$(sha256sum /mnt/*)"
72+
if [ "$SHA_IN" != "$SHA_OUT" ]; then
73+
echo "sha256sum does not match"
7074
exit 1
7175
fi
7276
sudo umount /mnt

0 commit comments

Comments
 (0)