]> arthur.barton.de Git - bup.git/commit
tests: fuse: use stat instead of relying on "ls -l" output
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 2 Jan 2020 21:34:52 +0000 (22:34 +0100)
committerRob Browning <rlb@defaultvalue.org>
Thu, 9 Jan 2020 06:13:29 +0000 (00:13 -0600)
commitc38e02f0f5daa4ddf4d2c0a553d717d1f3ad02e5
tree00228f73457dd2e94a8c4447243972de95437c4a
parent74c4650bc26e4e1e73c6d09464451501b0c75d33
tests: fuse: use stat instead of relying on "ls -l" output

On my Fedora 31 system, this currently fails because the test
expects the file mode bits to be printed as "-rw-r--r--" but
I get "-rw-r--r--." instead, perhaps due to selinux.

Fix this to use stat --format instead to extract the bits we
want to check here (user, group, mode, timestamp).

While at it, I noticed that this test has some confusion with
timezones and only worked because 'ls -l' doesn't show the
time in this case since the file is so old. Fix that by making
_everything_ here use UTC, instead of just some parts.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
t/test-fuse.sh