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

tests: extend touch test with atime

and add bug ref
parent d606f262
#!/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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment