2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2020 SUSE Linux Products GmbH. All Rights Reserved.
7 # Test file timestamps are only precise to seconds with 128-byte inodes."
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
24 # get standard environment, filters and checks
28 # remove previous $seqres.full before test
31 # real QA test starts here
32 _supported_fs ext3 ext4
35 _require_test_program "t_get_file_time"
37 echo "Silence is golden"
39 echo "Start test timestamps with 128 inode size one device $SCRATCH_DEV" >$seqres.full
40 _scratch_mkfs -I 128 >> $seqres.full 2>&1
43 touch "${SCRATCH_MNT}/tmp_file"
45 atime=`$here/src/t_get_file_time $SCRATCH_MNT/tmp_file atime nsec`
46 mtime=`$here/src/t_get_file_time $SCRATCH_MNT/tmp_file mtime nsec`
47 ctime=`$here/src/t_get_file_time $SCRATCH_MNT/tmp_file ctime nsec`
49 if [ $atime -ne 0 -o $mtime -ne 0 -o $ctime -ne 0 ]; then
50 echo "nsec should be zero when extended timestamps are disabled"
51 echo "atime: $atime, mtime: $mtime, ctime: $ctime"