generic: add test for boundary in xfs_attr_shortform_verify
[xfstests-dev.git] / setup
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2003-2004 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 usage()
6 {
7
8         echo "Usage: $0 [options]"'
9
10         -s section      run only specified section(s) from config file
11         -S section      exclude the specified section from the config file
12 '
13         exit 0
14 }
15
16 while [ $# -gt 0 ]; do
17         case "$1" in
18         -\? | -h | --help) usage ;;
19         -s)     RUN_SECTION="$RUN_SECTION $2"; shift ;;
20         -S)     EXCLUDE_SECTION="$EXCLUDE_SECTION $2"; shift ;;
21         *)      usage ;;
22         esac
23         shift
24 done
25
26 if ! . ./common/config
27 then
28     echo "check: failed to source common/config"
29     exit 1
30 fi
31
32 for section in $HOST_OPTIONS_SECTIONS; do
33         OLD_FSTYP=$FSTYP
34         OLD_MOUNT_OPTIONS=$MOUNT_OPTIONS
35         get_next_config $section
36
37         # Do we need to run only some sections ?
38         if [ ! -z "$RUN_SECTION" ]; then
39                 skip=true
40                 for s in $RUN_SECTION; do
41                         if [ $section == $s ]; then
42                                 skip=false
43                                 break;
44                         fi
45                 done
46                 if $skip; then
47                         continue
48                 fi
49         fi
50
51         # Did this section get excluded?
52         if [ ! -z "$EXCLUDE_SECTION" ]; then
53                 skip=false
54                 for s in $EXCLUDE_SECTION; do
55                         if [ $section == $s ]; then
56                                 skip=true
57                                 break;
58                         fi
59                 done
60                 if $skip; then
61                         continue
62                 fi
63         fi
64
65         [ "$USE_EXTERNAL"    = yes ] || USE_EXTERNAL=no
66         [ "$USE_LBD_PATCH"   = yes ] || USE_LBD_PATCH=no
67         [ "$LARGE_SCRATCH_DEV"  = yes ] || LARGE_SCRATCH_DEV=no
68         [ "$USE_ATTR_SECURE" = yes ] || USE_ATTR_SECURE=no
69         [ -z "$FSTYP" ] && FSTYP="xfs"
70
71         cat <<EOF
72 SECTION       -- $section
73
74 TEST: DIR=$TEST_DIR DEV=$TEST_DEV rt=[$TEST_RTDEV] log=[$TEST_LOGDEV]
75 TAPE: dev=[$TAPE_DEV] rmt=[$RMT_TAPE_DEV] rmtirix=[$RMT_TAPE_USER@$RMT_IRIXTAPE_DEV]
76 SCRATCH: MNT=$SCRATCH_MNT DEV=$SCRATCH_DEV rt=[$SCRATCH_RTDEV] log=[$SCRATCH_LOGDEV]
77 VARIABLES: external=$USE_EXTERNAL largeblk=$USE_LBD_PATCH fstyp=$FSTYP
78            large_scratch_dev=$LARGE_SCRATCH_DEV attrsecure=$USE_ATTR_SECURE
79 --------
80 EOF
81 done