From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Filesystems are not required to try to fill the statx btime field unless the caller actually sets STATX_BTIME. They're allowed to volunteer that information "if it's cheap", but XFS doesn't volunteer and there may be filesystems that support btime but not cheaply. Either way, we want to test btime on any filesystem that supports it, cheaply or otherwise, so set STATX_BTIME when we're trying to detect support for it. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- common/rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index ab468adf..6fb71e60 100644 --- a/common/rc +++ b/common/rc @@ -3849,7 +3849,11 @@ _dmsetup_create() _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