2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
7 # Check if ctime is updated and written to disk after setfacl
9 # Regression test for the following extN commits
10 # c6ac12a ext4: update ctime when changing the file's permission by setfacl
11 # 30e2bab ext3: update ctime when changing the file's permission by setfacl
12 # 523825b ext2: update ctime when changing the file's permission by setfacl
17 _begin_fstest auto quick acl
19 # Override the default cleanup function.
26 # Import common functions.
30 testfile=$SCRATCH_MNT/testfile.$seq
32 # real QA test starts here
37 echo "Silence is golden"
39 _scratch_mkfs >/dev/null 2>&1
40 _scratch_mount >/dev/null 2>&1
44 ctime1=`stat -c %Z $testfile`
47 setfacl -m 'u::x,g::x,o::x' $testfile
48 ctime2=`stat -c %Z $testfile`
51 ctime3=`stat -c %Z $testfile`
53 if [ "$ctime1" == "$ctime2" ]; then
54 echo "error: ctime not updated after setfacl"
55 elif [ "$ctime1" == "$ctime3" ]; then
56 echo "error: on disk ctime not updated"