mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: unify _require_batched_discard
To check for FITRIM tests used _require_fstrim() and _test_batched_discard() but as _test_batched_discard() already includes _test_fstrim() unify FSTRIM check throughout xfstests with _require_batched_discard(). Signed-off-by: Dushan Tcholich <dusanc@gmail.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
ba3fc9f85b
commit
01d42b7efe
@@ -2347,14 +2347,14 @@ _require_fstrim()
|
||||
fi
|
||||
}
|
||||
|
||||
_test_batched_discard()
|
||||
_require_batched_discard()
|
||||
{
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: _test_batched_discard mnt_point" 1>&2
|
||||
echo "Usage: _require_batched_discard mnt_point" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
_require_fstrim
|
||||
$FSTRIM_PROG ${1} &>/dev/null
|
||||
[$FSTRIM_PROG $1 > /dev/null 2>&1] || _notrun "FITRIM not supported on $1"
|
||||
}
|
||||
|
||||
_require_dumpe2fs()
|
||||
|
||||
Reference in New Issue
Block a user