tests: regression tests for "." and ".." directory entries

This commit is contained in:
Andrei Borzenkov 2015-06-18 20:09:47 +03:00
parent f348aee7b3
commit 7af839a108

View file

@ -1121,6 +1121,36 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
fi fi
fi fi
case x"$fs" in
x"zfs"*)
LSROUT=$(run_grubfstest ls -- -la "($GRUBDEVICE)/grub fs@/.");;
*)
LSROUT=$(run_grubfstest ls -- -la "($GRUBDEVICE)/.");;
esac
if echo "$LSROUT" | grep -F " $BASEFILE" | grep "$BLOCKCNT" > /dev/null; then
:
else
echo DOT IN ROOTDIR FAIL
echo "$LSROUT"
TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
exit 1
fi
case x"$fs" in
x"zfs"*)
LSROUT=$(run_grubfstest ls -- -la "($GRUBDEVICE)/grub fs@/..");;
*)
LSROUT=$(run_grubfstest ls -- -la "($GRUBDEVICE)/..");;
esac
if echo "$LSROUT" | grep -F " $BASEFILE" | grep "$BLOCKCNT" > /dev/null; then
:
else
echo DOTDOT IN ROOTDIR FAIL
echo "$LSROUT"
TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
exit 1
fi
case x"$fs" in case x"$fs" in
x"zfs"*) x"zfs"*)
LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/grub fs@/////sdir");; LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/grub fs@/////sdir");;
@ -1151,6 +1181,36 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
exit 1 exit 1
fi fi
case x"$fs" in
x"zfs"*)
LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/grub fs@/sdir/.");;
*)
LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/sdir/.");;
esac
if echo "$LSROUT" | grep -F " 2.img" | grep $BLOCKCNT > /dev/null; then
:
else
echo DOT IN SUBDIR FAIL
echo "$LSROUT"
TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO/$OSDIR/sdir"
exit 1
fi
case x"$fs" in
x"zfs"*)
LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/grub fs@/sdir/../sdir");;
*)
LSROUT=$(run_grubfstest ls -- -l "($GRUBDEVICE)/sdir/../sdir");;
esac
if echo "$LSROUT" | grep -F " 2.img" | grep $BLOCKCNT > /dev/null; then
:
else
echo DOTDOT IN SUBDIR FAIL
echo "$LSROUT"
TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO/$OSDIR/ssdir"
exit 1
fi
LSOUT=`run_grubfstest ls -- -l "($GRUBDEVICE)"` LSOUT=`run_grubfstest ls -- -l "($GRUBDEVICE)"`
if [ x"$NOFSLABEL" = xy ]; then if [ x"$NOFSLABEL" = xy ]; then
: :