From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: eguan@redhat.com, darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH 2/9] populate: add _require_populate_commands to check for tools
Date: Sat, 21 Jan 2017 00:10:31 -0800 [thread overview]
Message-ID: <148498623185.17109.17088335991979624175.stgit@birch.djwong.org> (raw)
In-Reply-To: <148498621936.17109.4249711513404036449.stgit@birch.djwong.org>
Back when I created common/populate, I thought it was sufficient to
_require the tools that the populate functions need in the main
file. This turned out to be a bit sloppy, so move them into a
helper function and call it from everything that uses populate.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
common/populate | 9 ++++++---
tests/ext4/006 | 1 +
tests/xfs/083 | 3 +--
tests/xfs/085 | 1 +
tests/xfs/086 | 1 +
tests/xfs/087 | 1 +
tests/xfs/088 | 1 +
tests/xfs/089 | 1 +
tests/xfs/091 | 1 +
tests/xfs/093 | 1 +
tests/xfs/097 | 1 +
tests/xfs/098 | 1 +
tests/xfs/099 | 1 +
tests/xfs/100 | 1 +
tests/xfs/101 | 1 +
tests/xfs/102 | 1 +
tests/xfs/105 | 1 +
tests/xfs/112 | 1 +
tests/xfs/113 | 1 +
tests/xfs/117 | 1 +
tests/xfs/120 | 1 +
tests/xfs/123 | 1 +
tests/xfs/124 | 1 +
tests/xfs/125 | 1 +
tests/xfs/126 | 1 +
tests/xfs/269 | 1 +
tests/xfs/273 | 1 +
27 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/common/populate b/common/populate
index 164fdd3..c19666a 100644
--- a/common/populate
+++ b/common/populate
@@ -22,9 +22,12 @@
# Mountain View, CA 94043, USA, or: http://www.sgi.com
#-----------------------------------------------------------------------
-_require_xfs_io_command "falloc"
-_require_xfs_io_command "fpunch"
-_require_test_program "punch-alternating"
+_require_populate_commands() {
+ _require_xfs_io_command "falloc"
+ _require_xfs_io_command "fpunch"
+ _require_test_program "punch-alternating"
+ _require_command "$XFS_DB_PROG" "xfs_db"
+}
_require_xfs_db_blocktrash_z_command() {
test "${FSTYP}" = "xfs" || _notrun "cannot run xfs_db on ${FSTYP}"
diff --git a/tests/ext4/006 b/tests/ext4/006
index f6cca66..9662f50 100755
--- a/tests/ext4/006
+++ b/tests/ext4/006
@@ -54,6 +54,7 @@ _supported_os Linux
_require_scratch
_require_attrs
+_require_populate_commands
repair_scratch() {
fsck_pass="$1"
diff --git a/tests/xfs/083 b/tests/xfs/083
index 040f3b6..39bd75f 100755
--- a/tests/xfs/083
+++ b/tests/xfs/083
@@ -48,12 +48,11 @@ _cleanup()
_supported_fs xfs
_supported_os Linux
-_require_xfs_io_command "falloc"
-_require_xfs_io_command "fpunch"
_require_scratch
#_require_xfs_crc # checksum not required, but you probably want it anyway...
#_require_xfs_mkfs_crc
_require_attrs
+_require_populate_commands
scratch_repair() {
fsck_pass="$1"
diff --git a/tests/xfs/085 b/tests/xfs/085
index 1ca5354..0c85850 100755
--- a/tests/xfs/085
+++ b/tests/xfs/085
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
rm -f $seqres.full
diff --git a/tests/xfs/086 b/tests/xfs/086
index cf0a71a..787f886 100755
--- a/tests/xfs/086
+++ b/tests/xfs/086
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/087 b/tests/xfs/087
index 0bb3ec1..58ba958 100755
--- a/tests/xfs/087
+++ b/tests/xfs/087
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/088 b/tests/xfs/088
index d6972a4..36745b2 100755
--- a/tests/xfs/088
+++ b/tests/xfs/088
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/089 b/tests/xfs/089
index 06996a5..52bdd54 100755
--- a/tests/xfs/089
+++ b/tests/xfs/089
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/091 b/tests/xfs/091
index a263cb0..ae62337 100755
--- a/tests/xfs/091
+++ b/tests/xfs/091
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/093 b/tests/xfs/093
index 753231e..0f9311e 100755
--- a/tests/xfs/093
+++ b/tests/xfs/093
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/097 b/tests/xfs/097
index a75f06a..303ad04 100755
--- a/tests/xfs/097
+++ b/tests/xfs/097
@@ -52,6 +52,7 @@ _require_xfs_mkfs_finobt
_require_xfs_finobt
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/098 b/tests/xfs/098
index 581377e..7873f32 100755
--- a/tests/xfs/098
+++ b/tests/xfs/098
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/099 b/tests/xfs/099
index 85193ab..7835df9 100755
--- a/tests/xfs/099
+++ b/tests/xfs/099
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/100 b/tests/xfs/100
index 3bfafce..ebb656d 100755
--- a/tests/xfs/100
+++ b/tests/xfs/100
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/101 b/tests/xfs/101
index d3abd19..709fc9d 100755
--- a/tests/xfs/101
+++ b/tests/xfs/101
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/102 b/tests/xfs/102
index cf0d7a6..3d51c6a 100755
--- a/tests/xfs/102
+++ b/tests/xfs/102
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/105 b/tests/xfs/105
index 07ccf00..fc91a4f 100755
--- a/tests/xfs/105
+++ b/tests/xfs/105
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/112 b/tests/xfs/112
index 84f1f1d..ae75684 100755
--- a/tests/xfs/112
+++ b/tests/xfs/112
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/113 b/tests/xfs/113
index ec328bc..c347db7 100755
--- a/tests/xfs/113
+++ b/tests/xfs/113
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/117 b/tests/xfs/117
index f251fb3..f0b95aa 100755
--- a/tests/xfs/117
+++ b/tests/xfs/117
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/120 b/tests/xfs/120
index 3deece6..5a38000 100755
--- a/tests/xfs/120
+++ b/tests/xfs/120
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/123 b/tests/xfs/123
index e6cd8e7..7355e86 100755
--- a/tests/xfs/123
+++ b/tests/xfs/123
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/124 b/tests/xfs/124
index cfea2e6..a828dd6 100755
--- a/tests/xfs/124
+++ b/tests/xfs/124
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/125 b/tests/xfs/125
index 3f2f6f0..3afb4cc 100755
--- a/tests/xfs/125
+++ b/tests/xfs/125
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/126 b/tests/xfs/126
index 77779e0..d696ff1 100755
--- a/tests/xfs/126
+++ b/tests/xfs/126
@@ -50,6 +50,7 @@ _supported_os Linux
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
+_require_populate_commands
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
diff --git a/tests/xfs/269 b/tests/xfs/269
index b51ce64..318dd22 100755
--- a/tests/xfs/269
+++ b/tests/xfs/269
@@ -44,6 +44,7 @@ _cleanup()
# real QA test starts here
_supported_os Linux
_require_scratch
+_require_populate_commands
_require_test_program "attr-list-by-handle-cursor-test"
rm -f "$seqres.full"
diff --git a/tests/xfs/273 b/tests/xfs/273
index f4b57bb..1a4ee93 100755
--- a/tests/xfs/273
+++ b/tests/xfs/273
@@ -44,6 +44,7 @@ _cleanup()
_supported_os Linux
_supported_fs xfs
_require_scratch
+_require_populate_commands
_require_xfs_io_command "fsmap"
rm -f "$seqres.full"
next prev parent reply other threads:[~2017-01-21 8:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-21 8:10 [PATCH v5 0/9] xfstests: online scrub/repair support Darrick J. Wong
2017-01-21 8:10 ` [PATCH 1/9] populate: create all types of XFS metadata Darrick J. Wong
2017-01-21 8:10 ` Darrick J. Wong [this message]
2017-01-21 8:10 ` [PATCH 3/9] populate: optionally fill the filesystem when populating fs Darrick J. Wong
2017-01-21 8:10 ` [PATCH 4/9] populate: fix some silly errors when modifying a fs while fuzzing Darrick J. Wong
2017-01-21 8:10 ` [PATCH 5/9] common/fuzzy: move fuzzing helper functions here Darrick J. Wong
2017-01-27 8:12 ` Eryu Guan
2017-01-27 9:24 ` Darrick J. Wong
2017-01-21 8:10 ` [PATCH 6/9] populate: cache scratch metadata images Darrick J. Wong
2017-01-21 8:11 ` [PATCH 7/9] populate: discover XFS structure fields and fuzz verbs, and use them to fuzz fields Darrick J. Wong
2017-01-21 8:11 ` [PATCH 8/9] common/populate: create attrs in different namespaces Darrick J. Wong
2017-01-21 8:11 ` [PATCH 9/9] xfs: fuzz every field of every structure Darrick J. Wong
2017-01-21 19:38 ` [PATCH v5 0/9] xfstests: online scrub/repair support Amir Goldstein
2017-01-22 5:01 ` Darrick J. Wong
2017-01-22 6:10 ` Amir Goldstein
2017-01-26 5:08 ` Eryu Guan
2017-01-26 6:44 ` Darrick J. Wong
2017-01-26 7:26 ` Eryu Guan
2017-01-26 7:53 ` Darrick J. Wong
2017-01-27 1:41 ` Eryu Guan
2017-01-27 9:22 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2017-01-05 1:17 [PATCH v4 " Darrick J. Wong
2017-01-05 1:17 ` [PATCH 2/9] populate: add _require_populate_commands to check for tools Darrick J. Wong
2016-11-05 0:17 [PATCH v2 0/9] xfstests: online scrub/repair support Darrick J. Wong
2016-11-05 0:17 ` [PATCH 2/9] populate: add _require_populate_commands to check for tools Darrick J. Wong
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=148498623185.17109.17088335991979624175.stgit@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).