aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2023-12-28 23:17:10 -0600
committerTheodore Ts'o <tytso@mit.edu>2023-12-28 23:17:10 -0600
commit0d083935b6d138d1fa89c7bdcd130bf1a875254a (patch)
tree77e37802a7df498461433603c01b1b5be38d3c8b
parentce2e424b6cf0b99591372e49d0bca2b23e8c2151 (diff)
downloadxfstests-bld-0d083935b6d138d1fa89c7bdcd130bf1a875254a.tar.gz
run-fstests: try reading the config file from ~/.local/etc/XXX-xfstests
The get-config script will first try reading ~/.config/XXX-xfstests, and then ~/.local/etc/XXX-xfstests. Both config files can be present they will be read in the above order; or only one can be used, for those people who prefer using ~/.local/etc for their configuration files. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--run-fstests/util/get-config9
1 files changed, 7 insertions, 2 deletions
diff --git a/run-fstests/util/get-config b/run-fstests/util/get-config
index 52c86ef2..4be1c9cd 100644
--- a/run-fstests/util/get-config
+++ b/run-fstests/util/get-config
@@ -31,8 +31,13 @@ export KBUILD_DIR="$(dirname $DIR)/kernel-build"
# otherwise, look for config in default location ~/.config/
if [ -n "$XFSTESTS_CONFIG" -a -f "$XFSTESTS_CONFIG" ]; then
. "$XFSTESTS_CONFIG"
-elif [ -f "$HOME/.config/${XFSTESTS_FLAVOR}-xfstests" ]; then
- . "$HOME/.config/${XFSTESTS_FLAVOR}-xfstests"
+else
+ if [ -f "$HOME/.config/${XFSTESTS_FLAVOR}-xfstests" ]; then
+ . "$HOME/.config/${XFSTESTS_FLAVOR}-xfstests"
+ fi
+ if [ -f "$HOME/.local/etc/${XFSTESTS_FLAVOR}-xfstests" ]; then
+ . "$HOME/.local/etc/${XFSTESTS_FLAVOR}-xfstests"
+ fi
fi
# For gce-xfstests, source the config for the active account if present