generic: test PF_MEMALLOC interfering with accounting file write
[xfstests-dev.git] / common / config
index 64f87057f5d733beb4f4999583ccd79d2353772e..8023273da1158e9f4b041244705c6ff7dc1a71d1 100644 (file)
@@ -22,6 +22,9 @@
 # RMT_IRIXTAPE_DEV- the IRIX remote tape device for the xfsdump tests
 # RMT_TAPE_USER -   remote user for tape device
 # SELINUX_MOUNT_OPTIONS - Options to use when SELinux is enabled.
+# KEEP_DMESG -      whether to keep all dmesg for each test case.
+#                   yes: keep all dmesg
+#                   no: only keep dmesg with error/warning (default)
 #
 # - These can be added to $HOST_CONFIG_DIR (witch default to ./config)
 #   below or a separate local configuration file can be used (using
@@ -69,6 +72,17 @@ export OVL_WORK="ovl-work"
 # overlay mount point parent must be the base fs root
 export OVL_MNT="ovl-mnt"
 
+# From e2fsprogs/e2fsck/e2fsck.h:
+# Exit code used by fsck-type programs
+export FSCK_OK=0
+export FSCK_NONDESTRUCT=1
+export FSCK_REBOOT=2
+export FSCK_UNCORRECTED=4
+export FSCK_ERROR=8
+export FSCK_USAGE=16
+export FSCK_CANCELED=32
+export FSCK_LIBRARY=128
+
 export PWD=`pwd`
 #export DEBUG=${DEBUG:=...} # arbitrary CFLAGS really.
 export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}
@@ -140,6 +154,7 @@ MKSWAP_PROG="$MKSWAP_PROG -f"
 export XFS_LOGPRINT_PROG="$(type -P xfs_logprint)"
 export XFS_REPAIR_PROG="$(type -P xfs_repair)"
 export XFS_DB_PROG="$(type -P xfs_db)"
+export XFS_ADMIN_PROG="$(type -P xfs_admin)"
 export XFS_GROWFS_PROG=$(type -P xfs_growfs)
 export XFS_SPACEMAN_PROG="$(type -P xfs_spaceman)"
 export XFS_SCRUB_PROG="$(type -P xfs_scrub)"
@@ -165,6 +180,7 @@ export XFS_COPY_PROG="$(type -P xfs_copy)"
 export FSTRIM_PROG="$(type -P fstrim)"
 export DUMPE2FS_PROG="$(type -P dumpe2fs)"
 export RESIZE2FS_PROG="$(type -P resize2fs)"
+export F2FS_IO_PROG="$(type -P f2fs_io)"
 export FIO_PROG="$(type -P fio)"
 export FILEFRAG_PROG="$(type -P filefrag)"
 export E4DEFRAG_PROG="$(type -P e4defrag)"
@@ -172,6 +188,7 @@ export LOGGER_PROG="$(type -P logger)"
 export DBENCH_PROG="$(type -P dbench)"
 export DMSETUP_PROG="$(type -P dmsetup)"
 export WIPEFS_PROG="$(type -P wipefs)"
+export BLKDISCARD_PROG="$(type -P blkdiscard)"
 export DUMP_PROG="$(type -P dump)"
 export RESTORE_PROG="$(type -P restore)"
 export LVM_PROG="$(type -P lvm)"
@@ -196,10 +213,14 @@ export SQLITE3_PROG="$(type -P sqlite3)"
 export TIMEOUT_PROG="$(type -P timeout)"
 export SETCAP_PROG="$(type -P setcap)"
 export GETCAP_PROG="$(type -P getcap)"
+export CAPSH_PROG="$(type -P capsh)"
 export CHECKBASHISMS_PROG="$(type -P checkbashisms)"
 export XFS_INFO_PROG="$(type -P xfs_info)"
 export DUPEREMOVE_PROG="$(type -P duperemove)"
 export CC_PROG="$(type -P cc)"
+export FSVERITY_PROG="$(type -P fsverity)"
+export OPENSSL_PROG="$(type -P openssl)"
+export ACCTON_PROG="$(type -P accton)"
 
 # use 'udevadm settle' or 'udevsettle' to wait for lv to be settled.
 # newer systems have udevadm command but older systems like RHEL5 don't.
@@ -227,6 +248,7 @@ case "$HOSTOS" in
        export MKFS_BTRFS_PROG=$(set_mkfs_prog_path_with_opts btrfs)
        export MKFS_F2FS_PROG=$(set_mkfs_prog_path_with_opts f2fs)
        export DUMP_F2FS_PROG=$(type -P dump.f2fs)
+       export F2FS_IO_PROG=$(type -P f2fs_io)
        export BTRFS_UTIL_PROG=$(type -P btrfs)
        export BTRFS_SHOW_SUPER_PROG=$(type -P btrfs-show-super)
        export BTRFS_CONVERT_PROG=$(type -P btrfs-convert)
@@ -465,8 +487,8 @@ _check_device()
        fi
 
        case "$FSTYP" in
-       9p|tmpfs)
-               # 9p mount tags are just plain strings, so anything is allowed
+       9p|tmpfs|virtiofs)
+               # 9p and virtiofs mount tags are just plain strings, so anything is allowed
                # tmpfs doesn't use mount source, ignore
                ;;
        overlay)
@@ -519,7 +541,7 @@ _canonicalize_mountpoint()
 # When SCRATCH/TEST_* vars are defined in evironment and not
 # in config file, this function is called after vars have already
 # been overriden in the previous test.
-# In that case, TEST_DEV is a directory and not a blockdev and
+# In that case, TEST_DEV is a directory and not a blockdev/chardev and
 # the function will return without overriding the SCRATCH/TEST_* vars.
 _overlay_config_override()
 {
@@ -537,7 +559,7 @@ _overlay_config_override()
        #    the new OVL_BASE_SCRATCH/TEST_DEV/MNT vars are set to the values
        #    of the configured base fs and SCRATCH/TEST_DEV vars are set to the
        #    overlayfs base and mount dirs inside base fs mount.
-       [ -b "$TEST_DEV" ] || return 0
+       [ -b "$TEST_DEV" ] || [ -c "$TEST_DEV" ] || return 0
 
        # Config file may specify base fs type, but we obay -overlay flag
        [ "$FSTYP" == overlay ] || export OVL_BASE_FSTYP="$FSTYP"
@@ -557,7 +579,7 @@ _overlay_config_override()
        export TEST_DIR="$OVL_BASE_TEST_DIR/$OVL_MNT"
        export MOUNT_OPTIONS="$OVERLAY_MOUNT_OPTIONS"
 
-       [ -b "$SCRATCH_DEV" ] || return 0
+       [ -b "$SCRATCH_DEV" ] || [ -c "$SCRATCH_DEV" ] || return 0
 
        # Store original base fs vars
        export OVL_BASE_SCRATCH_DEV="$SCRATCH_DEV"