Commit 326d2cc5 authored by Bernhard M. Wiedemann's avatar Bernhard M. Wiedemann
Browse files

tests: extend touch test with atime

and add bug ref
parent d606f262
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
#!/bin/sh
# Test for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911281

. ./common

@@ -7,12 +8,16 @@ f=target/a
exmtime=12345678
touch $f
touch -d @$exmtime $f
mtime=$(stat --format=%Y $f)
[ "$mtime" = "$exmtime" ] || Fail "test1: Got=$mtime Expected=$exmtime"
mtime=$(stat --format=%X-%Y $f)
[ "$mtime" = "$exmtime-$exmtime" ] || Fail "test1: Got=$mtime Expected=$exmtime"
touch $f
# This is what tar xf does for extracted files via futimens(2)
touch -m -d @$exmtime $f
mtime=$(stat --format=%Y $f)
[ "$mtime" = "$exmtime" ] || XFail "test2: Got=$mtime Expected=$exmtime" # FIXME
touch $f
touch -a -d @$exmtime $f
atime=$(stat --format=%X $f)
[ "$atime" = "$exmtime" ] || XFail "test3: Got=$atime Expected=$exmtime" # FIXME
touch $f
Unmount