[Git][reproducible-builds/disorderfs][master] Add two tests
Bernhard M. Wiedemann
gitlab at salsa.debian.org
Wed Oct 17 21:45:48 CEST 2018
Bernhard M. Wiedemann pushed to branch master at Reproducible Builds / disorderfs
Commits:
d606f262 by Bernhard M. Wiedemann at 2018-10-17T19:44:22Z
Add two tests
one passing and
one "FIXME" XFail that needs a code fix
- - - - -
2 changed files:
- tests/common
- + tests/touch
Changes:
=====================================
tests/common
=====================================
@@ -19,6 +19,10 @@ Fail () {
exit 1
}
+XFail () {
+ echo "XFail: ${*}"
+}
+
Expect () {
ENTRIES="$(Get_entries)"
EXPECTED="${1}"
=====================================
tests/touch
=====================================
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+. ./common
+
+Mount
+f=target/a
+exmtime=12345678
+touch $f
+touch -d @$exmtime $f
+mtime=$(stat --format=%Y $f)
+[ "$mtime" = "$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
+Unmount
View it on GitLab: https://salsa.debian.org/reproducible-builds/disorderfs/commit/d606f262f0e3f6a87f520ae1a93391c4b48c029e
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/disorderfs/commit/d606f262f0e3f6a87f520ae1a93391c4b48c029e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20181017/e7cc70ac/attachment.html>
More information about the rb-commits
mailing list