check: use generated group files
[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 . ./common/preamble
10 _begin_fstest auto quick
11
12 # Import common functions.
13 . ./common/filter
14
15 # real QA test starts here
16 _supported_fs ext3 ext4
17
18 _require_scratch
19 _require_test_program "t_get_file_time"
20
21 echo "Silence is golden"
22
23 echo "Start test timestamps with 128 inode size one device $SCRATCH_DEV" >$seqres.full
24 _scratch_mkfs -I 128 >> $seqres.full 2>&1
25 _scratch_mount
26
27 touch "${SCRATCH_MNT}/tmp_file"
28
29 atime=`$here/src/t_get_file_time $SCRATCH_MNT/tmp_file atime nsec`
30 mtime=`$here/src/t_get_file_time $SCRATCH_MNT/tmp_file mtime nsec`
31 ctime=`$here/src/t_get_file_time $SCRATCH_MNT/tmp_file ctime nsec`
32
33 if [ $atime -ne 0 -o $mtime -ne 0 -o $ctime -ne 0 ]; then
34        echo "nsec should be zero when extended timestamps are disabled"
35        echo "atime: $atime, mtime: $mtime, ctime: $ctime"
36 fi
37
38 status=0
39 exit