mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
check: prepare test report generator infrastructure
Save testcase data which later may be used by report generators - Save failure reason to $err_msg variable - Save number of notrun tests to $n_notrun counter, similar to $n_try,$n_bad Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
be5b594a4c
commit
e11c519918
+6
-16
@@ -333,7 +333,7 @@ _check_xfs_filesystem()
|
||||
if [ -n "$TEST_XFS_SCRUB" ] && [ -x "$XFS_SCRUB_PROG" ]; then
|
||||
"$XFS_SCRUB_PROG" $scrubflag -vd $device >>$seqres.full
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "filesystem on $device failed scrub (see $seqres.full)"
|
||||
_log_err "filesystem on $device failed scrub"
|
||||
ok=0
|
||||
fi
|
||||
fi
|
||||
@@ -344,9 +344,7 @@ _check_xfs_filesystem()
|
||||
$XFS_LOGPRINT_PROG -t $extra_log_options $device 2>&1 \
|
||||
| tee $tmp.logprint | grep -q "<CLEAN>"
|
||||
if [ $? -ne 0 -a "$HOSTOS" = "Linux" ]; then
|
||||
echo "_check_xfs_filesystem: filesystem on $device has dirty log (see $seqres.full)"
|
||||
|
||||
echo "_check_xfs_filesystem: filesystem on $device has dirty log" >>$seqres.full
|
||||
_log_err "_check_xfs_filesystem: filesystem on $device has dirty log"
|
||||
echo "*** xfs_logprint -t output ***" >>$seqres.full
|
||||
cat $tmp.logprint >>$seqres.full
|
||||
echo "*** end xfs_logprint output" >>$seqres.full
|
||||
@@ -362,9 +360,7 @@ _check_xfs_filesystem()
|
||||
_fix_malloc >$tmp.fs_check
|
||||
fi
|
||||
if [ -s $tmp.fs_check ]; then
|
||||
echo "_check_xfs_filesystem: filesystem on $device is inconsistent (c) (see $seqres.full)"
|
||||
|
||||
echo "_check_xfs_filesystem: filesystem on $device is inconsistent" >>$seqres.full
|
||||
_log_err "_check_xfs_filesystem: filesystem on $device is inconsistent (c)"
|
||||
echo "*** xfs_check output ***" >>$seqres.full
|
||||
cat $tmp.fs_check >>$seqres.full
|
||||
echo "*** end xfs_check output" >>$seqres.full
|
||||
@@ -374,9 +370,7 @@ _check_xfs_filesystem()
|
||||
|
||||
$XFS_REPAIR_PROG -n $extra_options $extra_log_options $extra_rt_options $device >$tmp.repair 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "_check_xfs_filesystem: filesystem on $device is inconsistent (r) (see $seqres.full)"
|
||||
|
||||
echo "_check_xfs_filesystem: filesystem on $device is inconsistent" >>$seqres.full
|
||||
_log_err "_check_xfs_filesystem: filesystem on $device is inconsistent (r)"
|
||||
echo "*** xfs_repair -n output ***" >>$seqres.full
|
||||
cat $tmp.repair | _fix_malloc >>$seqres.full
|
||||
echo "*** end xfs_repair output" >>$seqres.full
|
||||
@@ -389,9 +383,7 @@ _check_xfs_filesystem()
|
||||
if [ -n "$TEST_XFS_REPAIR_REBUILD" ]; then
|
||||
$XFS_REPAIR_PROG $extra_options $extra_log_options $extra_rt_options $device >$tmp.repair 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "_check_xfs_filesystem: filesystem on $device is inconsistent (rebuild) (see $seqres.full)"
|
||||
|
||||
echo "_check_xfs_filesystem: filesystem on $device is inconsistent (rebuild)" >>$seqres.full
|
||||
_log_err "_check_xfs_filesystem: filesystem on $device is inconsistent (rebuild)"
|
||||
echo "*** xfs_repair output ***" >>$seqres.full
|
||||
cat $tmp.repair | _fix_malloc >>$seqres.full
|
||||
echo "*** end xfs_repair output" >>$seqres.full
|
||||
@@ -402,9 +394,7 @@ _check_xfs_filesystem()
|
||||
|
||||
$XFS_REPAIR_PROG -n $extra_options $extra_log_options $extra_rt_options $device >$tmp.repair 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "_check_xfs_filesystem: filesystem on $device is inconsistent (rebuild-reverify) (see $seqres.full)"
|
||||
|
||||
echo "_check_xfs_filesystem: filesystem on $device is inconsistent (rebuild-reverify)" >>$seqres.full
|
||||
_log_err "_check_xfs_filesystem: filesystem on $device is inconsistent (rebuild-reverify)"
|
||||
echo "*** xfs_repair -n output ***" >>$seqres.full
|
||||
cat $tmp.repair | _fix_malloc >>$seqres.full
|
||||
echo "*** end xfs_repair output" >>$seqres.full
|
||||
|
||||
Reference in New Issue
Block a user