Skip to content

Various test fixes and improvements

Glenn Washburn grub-devel 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 4 repliesIn review
  2. v15 patches 1 replySuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5tests: Do not remove image file on error in pata_testtests/pata_test.in+0 -10 replies
2/5tests: Skip pata_test on i386-efitests/pata_test.in+3 -00 replies
3/5tests: Remove $((BASE#NUM)) bashism in grub-fs-testertests/util/grub-fs-tester.in+5 -50 replies
4/5tests: Ensure that mountpoints are unmounted before exitingtests/util/grub-fs-tester.in+26 -31 reply
5/5tests: Ensure that loopback devices and zfs devices are cleaned uptests/util/grub-fs-tester.in+17 -02 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchDaniel Kiper
1/5R-b
2/5R-b
3/5R-b
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] Various test fixes and improvements

v3 - Fix botched v2 udate
v2 - Updated with Daniel's suggestions.

Glenn

Glenn Washburn (5):
tests: Do not remove image file on error in pata_test
tests: Skip pata_test on i386-efi
tests: Remove $((BASE#NUM)) bashism in grub-fs-tester
tests: Ensure that mountpoints are unmounted before exiting
tests: Ensure that loopback devices and zfs devices are cleaned up

 tests/pata_test.in           |  4 ++-
 tests/util/grub-fs-tester.in | 56 ++++++++++++++++++++++++++++++------
 2 files changed, 51 insertions(+), 9 deletions(-)

Range-diff against v2:

1:  24b2a4bfd = 1:  313168dd7 tests: Do not remove image file on error in pata_test
2:  a64ebe41a = 2:  53df676e7 tests: Skip pata_test on i386-efi
3:  d2248490b = 3:  401b227cb tests: Remove $((BASE#NUM)) bashism in grub-fs-tester
4:  410461b20 ! 4:  8fb4d98fd tests: Ensure that mountpoints are unmounted before exiting
    @@ tests/util/grub-fs-tester.in: tempdir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX
      XORRISOFS_CHARSET="-input-charset UTF-8 -output-charset UTF-8"
      
     +MOUNTS=
    -+umount_all() {
    -+    for MOUNT in $MOUNTS; do
    -+	umount "$MOUNT" &&
    -+	MOUNTS="$(echo ${MOUNTS} | sed "s|$MOUNT||g;")"
    ++cleanup() {
    ++    for i in $MOUNTS; do
    ++	umount "$i" || :
     +    done
     +}
    -+trap umount_all EXIT INT
    ++trap cleanup EXIT INT
     +# This is for bash, dash and ash do not recognize ERR
    -+trap umount_all ERR || :
    ++trap cleanup ERR || :
     +
      # This wrapper is to ease insertion of valgrind or time statistics
      run_it () {

5: 61bd6959b ! 5: 8b05a80a1 tests: Ensure that loopback devices and zfs devices are cleaned up
@@ tests/util/grub-fs-tester.in: tempdir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX
XORRISOFS_CHARSET="-input-charset UTF-8 -output-charset UTF-8"

MOUNTS=
--umount_all() {
+LODEVICES=
-+cleanup() {
+ cleanup() {
+ if [ -n "$fs" -a -z "${fs##*zfs*}" -a -n "$FSLABEL" ]; then
+ zpool list "$FSLABEL" 2>/dev/null &&
+ while ! zpool export "$FSLABEL" ; do
@@ tests/util/grub-fs-tester.in: tempdir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX
+ done
+ fi
+
- for MOUNT in $MOUNTS; do
- umount "$MOUNT" &&
- MOUNTS="$(echo ${MOUNTS} | sed "s|$MOUNT||g;")"
+ for i in $MOUNTS; do
+ umount "$i" || :
done
+
+ for lodev in $LODEVICES; do
@@ tests/util/grub-fs-tester.in: tempdir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX
+ done
+ return 0
}
--trap umount_all EXIT INT
-+trap cleanup EXIT INT
+ trap cleanup EXIT INT
# This is for bash, dash and ash do not recognize ERR
--trap umount_all ERR || :
-+trap cleanup ERR || :
-
- # This wrapper is to ease insertion of valgrind or time statistics
- run_it () {

Signature · 1 line
2.27.0