summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2018-05-29 18:51:19 +0200
committerEryu Guan <guaneryu@gmail.com>2018-06-03 22:16:15 +0800
commit141bd37a36857984bb80f8534810951002dcdf13 (patch)
tree13c28fc03fc91b3d012a28a82df171e0cf23c875 /check
parentc4f104cdf420075674bdbedf190f052571af9c20 (diff)
fstests: Make ./new work for non-root user
Currently 'new' script sources common/config which tries to find mkfs and fails if not found (which is likely for non-root user). This is inconvenient as development usually does not happen as root. In fact the vast majority of setup in common/config and common/rc is not necessary for 'new'. Split out the necessary bits into new common/test_names and use it in 'new'. Cleanup common/rc and common/config now that they're only used from 'check' and 'setup'. Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Diffstat (limited to 'check')
-rwxr-xr-xcheck15
1 files changed, 4 insertions, 11 deletions
diff --git a/check b/check
index f6fb352b..a8cb7289 100755
--- a/check
+++ b/check
@@ -331,10 +331,10 @@ while [ $# -gt 0 ]; do
shift
done
-# we need common/config, source it after processing args, overlay needs FSTYP
-# set before sourcing common/config
-if ! . ./common/config; then
- echo "$iam: failed to source common/config"
+# we need common/rc, that also sources common/config. We need to source it
+# after processing args, overlay needs FSTYP set before sourcing common/config
+if ! . ./common/rc; then
+ echo "check: failed to source common/rc"
exit 1
fi
@@ -374,13 +374,6 @@ elif [ -z "$GROUP_LIST" ]; then
GROUP_LIST="auto"
fi
-# we need common/rc
-if ! . ./common/rc
-then
- echo "check: failed to source common/rc"
- exit 1
-fi
-
if [ `id -u` -ne 0 ]
then
echo "check: QA must be run as root"