]> 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>
Sat, 25 Apr 2020 19:17:49 +0000 (14:17 -0500)
commit5b0cf78fa87b9858eb09cbbfe41d68023ad75d83
tree3f8a14973960e0b5bcf1d50f05c25bd9a106d76c
parent193baa1303c67d3ec50c7c5e0637341aa06d9e13
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>
(cherry picked from commit c38e02f0f5daa4ddf4d2c0a553d717d1f3ad02e5)
Tested-by: Rob Browning <rlb@defaultvalue.org>
t/test-fuse.sh