mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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>
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
# generic initialization
|
||||
iam=new
|
||||
. ./common/rc
|
||||
. ./common/test_names
|
||||
|
||||
trap "rm -f /tmp/$$.; exit" 0 1 2 3 15
|
||||
|
||||
@@ -81,6 +81,9 @@ line=0
|
||||
eof=1
|
||||
[ -f "$tdir/group" ] || usage
|
||||
|
||||
export AWK_PROG="$(type -P awk)"
|
||||
[ "$AWK_PROG" = "" ] && { echo "awk not found"; exit; }
|
||||
|
||||
for found in `cat $tdir/group | tr - ' ' | $AWK_PROG '{ print $1 }'`
|
||||
do
|
||||
line=$((line+1))
|
||||
|
||||
Reference in New Issue
Block a user