From 6153eed3ee180e8695c9e2e3d9ad9db8a6b73ad8 Mon Sep 17 00:00:00 2001 From: Bruno Faccini Date: Tue, 18 Feb 2025 18:36:12 +0100 Subject: [PATCH] LU-18728 tests: use urandom to really consume ZFS space It appears newer ZFS is using data compression by default, so reading from /dev/zero results in files not consuming the expected amount of space. Instead, read from /dev/urandom for ZFS to write files in sanity and conf-sanity to ensure they fill the OSTs, or the image to be used for target creation, as expected. Test-Parameters: testgroup=review-zfs env=ZFS_MKFS_OPTS="compression=on" Signed-off-by: Bruno Faccini Change-Id: I7b4e95032608d8db82c75e4b6dd1ec5beb6f8d99 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58115 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 10 ++++------ lustre/tests/sanity.sh | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index a90eaa4..769dce7 100755 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -30,7 +30,6 @@ fi [ "$SLOW" = "no" ] && EXCEPT_SLOW="45 69 106 111 114" if [[ "$mds1_FSTYPE" == "zfs" ]]; then - always_except LU-18652 32b 32c 32e 32h always_except LU-18652 108a 112a 112b 113 117 119 121 122a always_except LU-18652 123aa 123ab 123ac 123ad 123ae 123af 123ag 123ah 123ahi always_except LU-18652 123F 123G 123H 126 129 132 133 135 136 137 150 152 153a 153b 153c 155 802a @@ -2113,8 +2112,8 @@ t32_verify_quota() { "$fsname.quota.ost" ug chmod 0777 $mnt - runas -u $T32_QID -g $T32_QID dd if=/dev/zero of=$mnt/t32_qf_new \ - bs=1M count=$((img_blimit / 1024)) oflag=sync && { + runas -u $T32_QID -g $T32_QID $DD of=$mnt/t32_qf_new \ + count=$((img_blimit / 1024)) oflag=sync && { echo "Write succeed, but expect -EDQUOT" return 1 } @@ -2165,9 +2164,8 @@ t32_verify_quota() { return 1 } - runas -u $T32_QID -g $T32_QID \ - dd if=/dev/zero of=$pool_file_new \ - bs=1M count=$((img_blimit_pool / 1024)) oflag=sync && { + runas -u $T32_QID -g $T32_QID $DD of=$pool_file_new \ + count=$((img_blimit_pool / 1024)) oflag=sync && { echo "Write $pool_file_new succeed, but expect -EDQUOT" return 1 } diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 133985e..77ed27b 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -30569,7 +30569,7 @@ generate_uneven_mdts() { if check_fallocate_supported mds$((min_index + 1)); then cmd="fallocate -l 128K " else - cmd="dd if=/dev/zero bs=128K count=1 of=" + cmd="$DD bs=128K count=1 of=" fi echo "using cmd $cmd" -- 1.8.3.1