File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,10 @@ truncate -s 8G disk.img
5050mkfs.ext4 -F disk.img
5151DEV=$( sudo losetup --show --find disk.img)
5252sudo 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/* ) "
5457sudo umount /mnt
5558sudo losetup -d $DEV
5659
@@ -65,8 +68,9 @@ run_qemu
6568
6669DEV=$( sudo losetup --show --find disk.img)
6770sudo 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
7175fi
7276sudo umount /mnt
You can’t perform that action at this time.
0 commit comments