xfs/{263,106}: erase max warnings printout
[xfstests-dev.git] / tests / ext4 / 043
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2020 SUSE Linux Products GmbH.  All Rights Reserved.
4 #
5 # FS QA Test No. 043
6 #
7 # Test file timestamps are only precise to seconds with 128-byte inodes."
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1       # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
17
18 _cleanup()
19 {
20        cd /
21        rm -f $tmp.*
22 }
23
24 # get standard environment, filters and checks
25 . ./common/rc
26 . ./common/filter
27
28 # remove previous $seqres.full before test
29 rm -f $seqres.full
30
31 # real QA test starts here
32 _supported_fs ext3 ext4
33 _supported_os Linux
34
35 _require_scratch
36 _require_test_program "t_get_file_time"
37
38 echo "Silence is golden"
39
40 echo "Start test timestamps with 128 inode size one device $SCRATCH_DEV" >$seqres.full
41 _scratch_mkfs -I 128 >> $seqres.full 2>&1
42 _scratch_mount
43
44 touch "${SCRATCH_MNT}/tmp_file"
45
46 atime=`$here/src/t_get_file_time $SCRATCH_MNT/tmp_file atime nsec`
47 mtime=`$here/src/t_get_file_time $SCRATCH_MNT/tmp_file mtime nsec`
48 ctime=`$here/src/t_get_file_time $SCRATCH_MNT/tmp_file ctime nsec`
49
50 if [ $atime -ne 0 -o $mtime -ne 0 -o $ctime -ne 0 ]; then
51        echo "nsec should be zero when extended timestamps are disabled"
52        echo "atime: $atime, mtime: $mtime, ctime: $ctime"
53 fi
54
55 status=0
56 exit