Whamcloud - gitweb
LU-18676 tests: random write to set file size 83/58083/9
authorHongchao Zhang <hongchao@whamcloud.com>
Sat, 15 Mar 2025 19:14:58 +0000 (03:14 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 03:58:08 +0000 (03:58 +0000)
commit149657180e53bc1cfee876bb4ced72853a10b09c
tree327de28a40fcd999059879a31895d7d408a9e787
parent8913e75cb7d8611b72273129aef363221ef74479
LU-18676 tests: random write to set file size

The sanity-quota.sh test_49 is using "createmany -S 4k"
to set the size of a new file instead of writing all the
actual file data.  Add a new "-W SIZE" option to write
the specified number of random bytes instead of only
writing a few bytes at the end of the file.

This avoids issues with sparse files or data compression
resulting in less space being allocated than expected.

Test-Parameters: testlist=sanity-quota fstype=zfs env=ONLY=49,ONLY_REPEAT=50
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ida93da881b48e6fdd85b64e90991b85f28de63d4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58083
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
lustre/tests/createmany.c
lustre/tests/sanity-quota.sh