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>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
27 files changed:
# Mountain View, CA 94043, USA, or: http://www.sgi.com
#-----------------------------------------------------------------------
# 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}"
_require_xfs_db_blocktrash_z_command() {
test "${FSTYP}" = "xfs" || _notrun "cannot run xfs_db on ${FSTYP}"
_require_scratch
_require_attrs
_require_scratch
_require_attrs
+_require_populate_commands
repair_scratch() {
fsck_pass="$1"
repair_scratch() {
fsck_pass="$1"
_supported_fs xfs
_supported_os Linux
_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_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"
scratch_repair() {
fsck_pass="$1"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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
_require_xfs_db_blocktrash_z_command
rm -f $seqres.full
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_xfs_finobt
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
_require_scratch
test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
_require_attrs
_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"
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
# real QA test starts here
_supported_os Linux
_require_scratch
# 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"
_require_test_program "attr-list-by-handle-cursor-test"
rm -f "$seqres.full"
_supported_os Linux
_supported_fs xfs
_require_scratch
_supported_os Linux
_supported_fs xfs
_require_scratch
+_require_populate_commands
_require_xfs_io_command "fsmap"
rm -f "$seqres.full"
_require_xfs_io_command "fsmap"
rm -f "$seqres.full"