[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils-8.2 misc/ls-time test failure
From: |
Eric Blake |
Subject: |
Re: coreutils-8.2 misc/ls-time test failure |
Date: |
Tue, 15 Dec 2009 19:48:49 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to John Stanley on 12/15/2009 4:42 PM:
> Basically, what's happening is that 'touch -a ..' updated ctime in
> coreutils-7.6,
> but does not update ctime in coreutils-8.2 (hence misc/ls-time fails).
Ouch. That's a bug in the kernel; I can reproduce it:
$ uname -a
Linux fencepost 2.6.26-2-xen-amd64 #1 SMP Thu Nov 5 04:27:12 UTC 2009
x86_64 GNU/Linux
$ touch q
$ stat -c '%x %z' q
2009-12-15 21:46:33.186677568 -0500 2009-12-15 21:46:33.186677568 -0500
$ touch -a q
$ stat -c '%x %z' q
2009-12-15 21:47:15.157175384 -0500 2009-12-15 21:46:33.186677568 -0500
$
> I believe that an atime update in an
> inode should
> not result in a ctime update.
Unfortunately, you got it backwards. POSIX requires that any modification
to inode metadata, such as calling utimensat, must update the ctime to the
point at which the modification was done.
> For coreutils-7.6, this gives:
>
> -rw-r--r-- 1 root root 0 2009-12-15 18:17:58.935039372 -0500 a
> -rw-r--r-- 1 root root 0 2009-12-15 18:17:58.941039579 -0500 c
>
> -rw-r--r-- 1 root root 0 2009-12-15 18:18:00.949039236 -0500 a
> -rw-r--r-- 1 root root 0 2009-12-15 18:17:58.944039683 -0500 c
Correct - the ctime for both files were updated. But coreutils 7.6 didn't
use utimensat.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksoSpEACgkQ84KuGfSFAYDZoACbBOWPU8HS4QNNyxeKl5JI5z7y
8D4Anjfz7g4PsaJiK8cUwcOVaX6cSSK8
=CbST
-----END PGP SIGNATURE-----