1.1 --- a/test_files/mk_e2test.sh Wed Jan 17 00:53:24 2024 +0100
1.2 +++ b/test_files/mk_e2test.sh Wed Jan 17 18:56:05 2024 +0100
1.3 @@ -2,7 +2,7 @@
1.4
1.5 # Make a test filesystem.
1.6 #
1.7 -# Copyright (C) 2021, 2022 Paul Boddie <paul@boddie.org.uk>
1.8 +# Copyright (C) 2021, 2022, 2024 Paul Boddie <paul@boddie.org.uk>
1.9 #
1.10 # This program is free software; you can redistribute it and/or
1.11 # modify it under the terms of the GNU General Public License as
1.12 @@ -114,20 +114,24 @@
1.13
1.14 cp "$PKGDIR/../docs/LICENCE.txt" .
1.15
1.16 -# Put some programs in the same place.
1.17 +# Return to the top level.
1.18 +
1.19 +cd ../..
1.20 +
1.21 +# Create a top-level bin directory.
1.22 +
1.23 +mkdir bin
1.24 +
1.25 +# Put some programs in the bin directory.
1.26
1.27 for PROGRAM in $* ; do
1.28 - cp $(realpath "$PROGRAM") .
1.29 + cp $(realpath "$PROGRAM") bin
1.30 done
1.31
1.32 -# Leave the filesystem root.
1.33 -
1.34 -cd ../..
1.35 -
1.36 # Create a filesystem image.
1.37
1.38 EXTRA=2000
1.39 -SIZE=$(du -s -k home | cut -f 1)
1.40 +SIZE=$(du -s -k . | cut -f 1)
1.41 TOTAL=$(($SIZE + $EXTRA))
1.42
1.43 dd if=/dev/zero of="$TARGET" bs=1024 count=$TOTAL
1.44 @@ -138,7 +142,7 @@
1.45
1.46 # Add the directories and files to the image.
1.47
1.48 -for DIR in home/paulb home/paulb/private home/paulb/public home/paulb/shared home/paulb/many ; do
1.49 +for DIR in bin home/paulb home/paulb/private home/paulb/public home/paulb/shared home/paulb/many ; do
1.50 e2access mkdir "$DIR"
1.51 e2access copy-in $(find "$DIR" -maxdepth 1 -type f | sort) "$DIR"
1.52 done
1.53 @@ -149,6 +153,7 @@
1.54
1.55 if [ ! "$QUIET" ] ; then
1.56 e2access ls ''
1.57 + e2access ls 'bin'
1.58 e2access ls 'home'
1.59 e2access ls 'home/paulb'
1.60 e2access ls 'home/paulb/many'