From: Masami Ichikawa Date: Thu, 3 Sep 2020 01:04:36 +0000 (+0900) Subject: tests: mkfs-endianness test use iflag=fullblock to fill block completely with string X-Git-Tag: v2.37-rc1~496^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b54f05d6b7124c23bff3bc1b8310231c8a2e131;p=thirdparty%2Futil-linux.git tests: mkfs-endianness test use iflag=fullblock to fill block completely with string When run mkfs-endianness test on lowend machine, sometimes dd didn't fill block with string then test failed. So, it's nice to add iflag=fullblock option to fill a block with string read from stdin. Tested on Raspberry Pi 3 B+(using 1core to simulate lowend environment) with iflag=fullblock option didn't get test failure. Without iflag=fullblock option. $ sudo sh -c 'for i in $(seq 1 500); do taskset -c 0 ./ts/cramfs/mkfs-endianness ; done' | grep FAILED | wc -l 49 With iflag=fullblock option. $ sudo sh -c 'for i in $(seq 1 500); do taskset -c 0 ./ts/cramfs/mkfs-endianness ; done' | grep FAILED | wc -l 0 Signed-off-by: Masami Ichikawa --- diff --git a/tests/ts/cramfs/mkfs-endianness b/tests/ts/cramfs/mkfs-endianness index e3913d65eb..e3e3ffc2db 100755 --- a/tests/ts/cramfs/mkfs-endianness +++ b/tests/ts/cramfs/mkfs-endianness @@ -45,9 +45,9 @@ test_image() { rm -rf "$IMAGE_DATA" mkdir -p $IMAGE_DATA/dirA/dirB yes "Testing cramfs 1234567890 Endianness check 1234567890 Endianness check" \ - | dd of=$IMAGE_DATA/dirA/dirB/a bs=512 count=1 &> /dev/null + | dd of=$IMAGE_DATA/dirA/dirB/a iflag=fullblock bs=512 count=1 &> /dev/null yes "Testing cramfs 1234567890 Endianness check 1234567890 Endianness check" \ - | dd of=$IMAGE_DATA/dirA/dirB/b bs=512 count=30 &> /dev/null + | dd of=$IMAGE_DATA/dirA/dirB/b iflag=fullblock bs=512 count=30 &> /dev/null # sudo may use whatever group chgrp -R 0 $IMAGE_DATA