[Git][reproducible-builds/disorderfs][master] Inform FUSE that we wrap and thus accept the UTIME_OMIT (and UTIME_NOW) magic…

Chris Lamb gitlab at salsa.debian.org
Wed Oct 24 22:04:18 CEST 2018


Chris Lamb pushed to branch master at Reproducible Builds / disorderfs


Commits:
e58c31a8 by Chris Lamb at 2018-10-24T20:01:41Z
Inform FUSE that we wrap and thus accept the UTIME_OMIT (and UTIME_NOW) magic values to ensure that "touch -m …" and "touch -a …" work as expected. (Closes: #911281)

- - - - -


3 changed files:

- disorderfs.cpp
- tests/common
- tests/touch


Changes:

=====================================
disorderfs.cpp
=====================================
@@ -293,6 +293,12 @@ int	main (int argc, char** argv)
 	 * Initialize disorderfs_fuse_operations
 	 */
 
+	/*
+	 * Indicate that we should accept UTIME_OMIT (and UTIME_NOW) in the
+	 * utimens operations for "touch -m" and "touch -a"
+	 */
+	disorderfs_fuse_operations.flag_utime_omit_ok = 1;
+
 	disorderfs_fuse_operations.getattr = [] (const char* path, struct stat* st) -> int {
 		Guard g;
 		if (lstat((root + path).c_str(), st) == -1) {


=====================================
tests/common
=====================================
@@ -19,10 +19,6 @@ Fail () {
 	exit 1
 }
 
-XFail () {
-	echo "XFail: ${*}"
-}
-
 Expect () {
 	ENTRIES="$(Get_entries)"
 	EXPECTED="${1}"


=====================================
tests/touch
=====================================
@@ -20,21 +20,17 @@ fi
 touch ${FILENAME}
 touch -m -d @${EXPECTED} ${FILENAME}
 RESULT="$(stat --format=%Y ${FILENAME})"
-if [ "${RESULT}" = "${EXPECTED}" ]
+if [ "${RESULT}" != "${EXPECTED}" ]
 then
-	Fail "test2: Did not XFail"
-else
-	XFail "test2: Got=${RESULT} Expected=${EXPECTED}"
+	Fail "test2: Got=${RESULT} Expected=${EXPECTED}"
 fi
 
 touch ${FILENAME}
 touch -a -d @${EXPECTED} ${FILENAME}
 RESULT="$(stat --format=%X ${FILENAME})"
-if [ "${RESULT}" = "${EXPECTED}" ]
+if [ "${RESULT}" != "${EXPECTED}" ]
 then
-	Fail "test3: Did not XFail"
-else
-	XFail "test3: Got=${RESULT} Expected=${EXPECTED}"
+	Fail "test3: Got=${RESULT} Expected=${EXPECTED}"
 fi
 
 Unmount



View it on GitLab: https://salsa.debian.org/reproducible-builds/disorderfs/commit/e58c31a869a1b575a946b8977c6adf8aece5f1d7

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/disorderfs/commit/e58c31a869a1b575a946b8977c6adf8aece5f1d7
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/20181024/b8fda011/attachment.html>


More information about the rb-commits mailing list