diff mbox series

[2/5] generic/299: limit max file size

Message ID 20190220015955.26342-3-yuyufen@huawei.com (mailing list archive)
State New, archived
Headers show
Series define common _get_max_file_size function | expand

Commit Message

Yufen Yu Feb. 20, 2019, 1:59 a.m. UTC
We limit the max size and let the test go on running.

Signed-off-by: Yufen Yu <yuyufen@huawei.com>
---
 tests/generic/299 | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/tests/generic/299 b/tests/generic/299
index c4d74fc8..4d474032 100755
--- a/tests/generic/299
+++ b/tests/generic/299
@@ -33,6 +33,11 @@  NUM_JOBS=$((4*LOAD_FACTOR))
 BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
 FILE_SIZE=$((BLK_DEV_SIZE * 512))
 
+max_file_size=$(_get_max_file_size)
+if [ $max_file_size -lt $FILE_SIZE ]; then
+	FILE_SIZE=$max_file_size
+fi
+
 cat >$fio_config <<EOF
 ###########
 # $seq test fio activity