grub-fs-tester: Accomodate for slower systems.
fstime can be more different with xz squashfs. Allow difference up to 3 seconds. This code is ugly now but rewriting it now is not on the table.
This commit is contained in:
parent
bf0e59cebf
commit
cde63a3bb0
1 changed files with 2 additions and 1 deletions
|
@ -1304,10 +1304,11 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||||
# is not precise. Account for small difference here.
|
# is not precise. Account for small difference here.
|
||||||
FSTIMEM1="$(date -d "$FSTIME UTC -1 second" -u "+%Y-%m-%d %H:%M:%S")"
|
FSTIMEM1="$(date -d "$FSTIME UTC -1 second" -u "+%Y-%m-%d %H:%M:%S")"
|
||||||
FSTIMEM2="$(date -d "$FSTIME UTC -2 second" -u "+%Y-%m-%d %H:%M:%S")"
|
FSTIMEM2="$(date -d "$FSTIME UTC -2 second" -u "+%Y-%m-%d %H:%M:%S")"
|
||||||
|
FSTIMEM3="$(date -d "$FSTIME UTC -3 second" -u "+%Y-%m-%d %H:%M:%S")"
|
||||||
|
|
||||||
if [ x$NOFSTIME = xy ]; then
|
if [ x$NOFSTIME = xy ]; then
|
||||||
:
|
:
|
||||||
elif echo "$LSOUT" | grep -F 'Last modification time '"$FSTIME" > /dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM1" > /dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM2" > /dev/null; then
|
elif echo "$LSOUT" | grep -F 'Last modification time '"$FSTIME" > /dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM1" > /dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM2" || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM3" > /dev/null; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
echo FSTIME FAIL
|
echo FSTIME FAIL
|
||||||
|
|
Loading…
Reference in a new issue