mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
compat: use stat -c instead of stat --format
For busy-box systems that don't support the extended format options. Signed-off-by: Ari Sundholm <ari@tuxera.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
ccdcf1236c
commit
dbbaa6d4bc
+2
-2
@@ -122,9 +122,9 @@ _mount_flakey
|
|||||||
# The fstests framework automatically calls fsck after a test is run, so we
|
# The fstests framework automatically calls fsck after a test is run, so we
|
||||||
# don't need to call fsck explicitly here.
|
# don't need to call fsck explicitly here.
|
||||||
|
|
||||||
echo "Link count before rm foo_link_*: $(stat --format=%h $SCRATCH_MNT/foo)"
|
echo "Link count before rm foo_link_*: $(stat -c %h $SCRATCH_MNT/foo)"
|
||||||
rm -f $SCRATCH_MNT/foo_link_*
|
rm -f $SCRATCH_MNT/foo_link_*
|
||||||
echo "Link count after rm foo_link_*: $(stat --format=%h $SCRATCH_MNT/foo)"
|
echo "Link count after rm foo_link_*: $(stat -c %h $SCRATCH_MNT/foo)"
|
||||||
cat $SCRATCH_MNT/foo
|
cat $SCRATCH_MNT/foo
|
||||||
|
|
||||||
status=0
|
status=0
|
||||||
|
|||||||
+1
-1
@@ -116,7 +116,7 @@ _mount_flakey
|
|||||||
# the hard links and read the file's data. This is just to verify we don't
|
# the hard links and read the file's data. This is just to verify we don't
|
||||||
# get stale file handle errors (due to dangling directory index entries that
|
# get stale file handle errors (due to dangling directory index entries that
|
||||||
# point to inodes that no longer exist).
|
# point to inodes that no longer exist).
|
||||||
echo "Link count: $(stat --format=%h $SCRATCH_MNT/foo)"
|
echo "Link count: $(stat -c %h $SCRATCH_MNT/foo)"
|
||||||
[ -f $SCRATCH_MNT/foo ] || echo "Link foo is missing"
|
[ -f $SCRATCH_MNT/foo ] || echo "Link foo is missing"
|
||||||
for ((i = 1; i <= 3003; i++)); do
|
for ((i = 1; i <= 3003; i++)); do
|
||||||
name=foo_link_`printf "%04d" $i`
|
name=foo_link_`printf "%04d" $i`
|
||||||
|
|||||||
+2
-2
@@ -81,8 +81,8 @@ _load_flakey_table $FLAKEY_ALLOW_WRITES
|
|||||||
_mount_flakey
|
_mount_flakey
|
||||||
|
|
||||||
# Now verify both our files have a link count of 2.
|
# Now verify both our files have a link count of 2.
|
||||||
echo "Link count for file foo: $(stat --format=%h $SCRATCH_MNT/testdir/foo)"
|
echo "Link count for file foo: $(stat -c %h $SCRATCH_MNT/testdir/foo)"
|
||||||
echo "Link count for file bar: $(stat --format=%h $SCRATCH_MNT/testdir/bar)"
|
echo "Link count for file bar: $(stat -c %h $SCRATCH_MNT/testdir/bar)"
|
||||||
|
|
||||||
# We should be able to remove all the links of our files in testdir, and after
|
# We should be able to remove all the links of our files in testdir, and after
|
||||||
# that the parent directory should become empty and therefore possible to
|
# that the parent directory should become empty and therefore possible to
|
||||||
|
|||||||
Reference in New Issue
Block a user