All of lore.kernel.org
 help / color / mirror / Atom feed
From: Naohiro Aota <naohiro.aota@wdc.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Naohiro Aota <naohiro.aota@wdc.com>
Subject: [PATCH v2 4/8] fstests: btrfs: add minimal file system size check
Date: Thu, 12 Aug 2021 00:12:28 +0900	[thread overview]
Message-ID: <20210811151232.3713733-5-naohiro.aota@wdc.com> (raw)
In-Reply-To: <20210811151232.3713733-1-naohiro.aota@wdc.com>

Some btrfs tests call _scratch_pool_mkfs or _scratch_mkfs by themselves to
specify file system size limit. It slips through the check in
_scratch_mkfs_sized(). Let's add size check call for each of them.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 tests/btrfs/141 | 1 +
 tests/btrfs/142 | 1 +
 tests/btrfs/143 | 1 +
 tests/btrfs/150 | 1 +
 tests/btrfs/151 | 1 +
 tests/btrfs/156 | 1 +
 tests/btrfs/157 | 1 +
 tests/btrfs/158 | 1 +
 tests/btrfs/175 | 1 +
 9 files changed, 9 insertions(+)

diff --git a/tests/btrfs/141 b/tests/btrfs/141
index 6f9a177a4487..cf0979e9b42a 100755
--- a/tests/btrfs/141
+++ b/tests/btrfs/141
@@ -55,6 +55,7 @@ _scratch_dev_pool_get 2
 # step 1, create a raid1 btrfs which contains one 128k file.
 echo "step 1......mkfs.btrfs" >>$seqres.full
 
+_check_minimal_fs_size $(( 1024 * 1024 * 1024 ))
 mkfs_opts="-d raid1 -b 1G"
 _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1
 
diff --git a/tests/btrfs/142 b/tests/btrfs/142
index 3caa37d167ab..1318be0fba18 100755
--- a/tests/btrfs/142
+++ b/tests/btrfs/142
@@ -33,6 +33,7 @@ _scratch_dev_pool_get 2
 # step 1, create a raid1 btrfs which contains one 128k file.
 echo "step 1......mkfs.btrfs" >>$seqres.full
 
+_check_minimal_fs_size $(( 1024 * 1024 * 1024 ))
 mkfs_opts="-d raid1 -b 1G"
 _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1
 
diff --git a/tests/btrfs/143 b/tests/btrfs/143
index f062f77bd7ce..6736dcad1702 100755
--- a/tests/btrfs/143
+++ b/tests/btrfs/143
@@ -40,6 +40,7 @@ _scratch_dev_pool_get 2
 # step 1, create a raid1 btrfs which contains one 128k file.
 echo "step 1......mkfs.btrfs" >>$seqres.full
 
+_check_minimal_fs_size $(( 1024 * 1024 * 1024 ))
 mkfs_opts="-d raid1 -b 1G"
 _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1
 
diff --git a/tests/btrfs/150 b/tests/btrfs/150
index 56938b0f4500..986c80697f15 100755
--- a/tests/btrfs/150
+++ b/tests/btrfs/150
@@ -43,6 +43,7 @@ disable_io_failure()
 	echo 0 > $SYSFS_BDEV/make-it-fail
 }
 
+_check_minimal_fs_size $(( 1024 * 1024 * 1024 ))
 _scratch_pool_mkfs "-d raid1 -b 1G" >> $seqres.full 2>&1
 
 # It doesn't matter which compression algorithm we use.
diff --git a/tests/btrfs/151 b/tests/btrfs/151
index 3150fef07e19..099e85cc7b2e 100755
--- a/tests/btrfs/151
+++ b/tests/btrfs/151
@@ -23,6 +23,7 @@ _supported_fs btrfs
 _require_scratch
 _require_scratch_dev_pool 3
 _require_btrfs_dev_del_by_devid
+_check_minimal_fs_size $(( 1024 * 1024 * 1024 ))
 
 # We need exactly 3 disks to form a fixed stripe layout for this test.
 _scratch_dev_pool_get 3
diff --git a/tests/btrfs/156 b/tests/btrfs/156
index 364135ab3e65..11bf4638c7d1 100755
--- a/tests/btrfs/156
+++ b/tests/btrfs/156
@@ -37,6 +37,7 @@ nr_files=$(( $fs_size / $file_size / 2))
 # Force to use single data and meta profile.
 # Since the test relies on fstrim output, which will differ for different
 # profiles
+_check_minimal_fs_size $fs_size
 _scratch_mkfs -b $fs_size -m single -d single > /dev/null
 _scratch_mount
 
diff --git a/tests/btrfs/157 b/tests/btrfs/157
index c08cebdc9c22..0cfe3ce56548 100755
--- a/tests/btrfs/157
+++ b/tests/btrfs/157
@@ -60,6 +60,7 @@ _scratch_dev_pool_get 4
 # step 1: create a raid6 btrfs and create a 128K file
 echo "step 1......mkfs.btrfs" >>$seqres.full
 
+_check_minimal_fs_size $(( 1024 * 1024 * 1024 ))
 mkfs_opts="-d raid6 -b 1G"
 _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1
 
diff --git a/tests/btrfs/158 b/tests/btrfs/158
index 4a642f52c05e..ad374eba8c7e 100755
--- a/tests/btrfs/158
+++ b/tests/btrfs/158
@@ -52,6 +52,7 @@ _scratch_dev_pool_get 4
 # step 1: create a raid6 btrfs and create a 128K file
 echo "step 1......mkfs.btrfs" >>$seqres.full
 
+_check_minimal_fs_size $(( 1024 * 1024 * 1024 ))
 mkfs_opts="-d raid6 -b 1G"
 _scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1
 
diff --git a/tests/btrfs/175 b/tests/btrfs/175
index 8a9c0721f5ed..bf0ede257f87 100755
--- a/tests/btrfs/175
+++ b/tests/btrfs/175
@@ -14,6 +14,7 @@ _begin_fstest auto quick swap volume
 _supported_fs btrfs
 _require_scratch_dev_pool 2
 _require_scratch_swapfile
+_check_minimal_fs_size $((1024 * 1024 * 1024))
 
 cycle_swapfile() {
 	local sz=${1:-$(($(get_page_size) * 10))}
-- 
2.32.0


  parent reply	other threads:[~2021-08-11 15:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 15:12 [PATCH v2 0/8] fstests: add checks for testing zoned btrfs Naohiro Aota
2021-08-11 15:12 ` [PATCH v2 1/8] common/rc: introduce minimal fs size check Naohiro Aota
2021-08-11 15:12 ` [PATCH v2 2/8] common/rc: fix blocksize detection for btrfs Naohiro Aota
2021-08-11 15:12 ` [PATCH v2 3/8] btrfs/057: use _scratch_mkfs_sized to set filesystem size Naohiro Aota
2021-08-11 15:12 ` Naohiro Aota [this message]
2021-08-11 15:12 ` [PATCH v2 5/8] common: add zoned block device checks Naohiro Aota
2021-08-15 14:42   ` Eryu Guan
2021-08-16  6:06     ` Naohiro Aota
2021-08-11 15:12 ` [PATCH v2 6/8] shared/032: add check for zoned block device Naohiro Aota
2021-08-11 15:12 ` [PATCH v2 7/8] fstests: btrfs: add checks " Naohiro Aota
2021-08-15 15:12   ` Eryu Guan
2021-08-16  6:10     ` Naohiro Aota
2021-08-11 15:12 ` [PATCH v2 8/8] fstests: generic: " Naohiro Aota
2021-08-15 15:20   ` Eryu Guan
2021-08-16  6:19     ` Naohiro Aota
2021-08-12 15:41 ` [PATCH v2 0/8] fstests: add checks for testing zoned btrfs David Sterba
2021-08-15 15:21 ` Eryu Guan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210811151232.3713733-5-naohiro.aota@wdc.com \
    --to=naohiro.aota@wdc.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.