_require_btime()
{
- $XFS_IO_PROG -f $TEST_DIR/test_creation_time -c "statx -v" \
+ # Note: filesystems are not required to report btime (creation time)
+ # if the caller doesn't ask for it, so we define STATX_BTIME here and
+ # pass it in to the statx command.
+ export STATX_BTIME=0x800
+ $XFS_IO_PROG -f $TEST_DIR/test_creation_time -c "statx -m $STATX_BTIME -v" \
| grep btime >>$seqres.full 2>&1 || \
_notrun "inode creation time not supported by this filesystem"
rm -f $TEST_DIR/test_creation_time
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
- $XFS_IO_PROG -f $SCRATCH_MNT/test_creation_time -c "statx -v" \
+ # Note: filesystems are not required to report btime (creation time)
+ # if the caller doesn't ask for it, so we define STATX_BTIME here and
+ # pass it in to the statx command.
+ export STATX_BTIME=0x800
+ $XFS_IO_PROG -f $SCRATCH_MNT/test_creation_time -c "statx -m $STATX_BTIME -v" \
| grep btime >>$seqres.full 2>&1 || \
_notrun "inode creation time not supported by this filesystem"