Skip to content
Commits on Source (8)
disorderfs (0.5.5-1) unstable; urgency=medium
[ Chris Lamb ]
* 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)
[ Bernhard M. Wiedemann ]
* Add tests for file modification and access time issues.
-- Chris Lamb <lamby@debian.org> Wed, 24 Oct 2018 16:30:58 -0400
disorderfs (0.5.4-2) unstable; urgency=medium
* Use the new debhelper-compat(=11) notation and drop d/compat.
......
......@@ -43,7 +43,7 @@ extern "C" {
#include <sys/file.h>
#include <stddef.h>
#define DISORDERFS_VERSION "0.5.4"
#define DISORDERFS_VERSION "0.5.5"
namespace {
std::vector<std::string> bare_arguments;
......@@ -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) {
......
#!/bin/sh
# Test for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911281
. ./common
Mount
EXPECTED="12345678"
FILENAME="target/a"
touch ${FILENAME}
touch -d @${EXPECTED} ${FILENAME}
RESULT="$(stat --format=%X-%Y ${FILENAME})"
if [ "${RESULT}" != "${EXPECTED}-${EXPECTED}" ]
then
Fail "test1: Got=${RESULT} Expected=${EXPECTED}"
fi
# This is what tar xf does for extracted files via futimens(2)
touch ${FILENAME}
touch -m -d @${EXPECTED} ${FILENAME}
RESULT="$(stat --format=%Y ${FILENAME})"
if [ "${RESULT}" != "${EXPECTED}" ]
then
Fail "test2: Got=${RESULT} Expected=${EXPECTED}"
fi
touch ${FILENAME}
touch -a -d @${EXPECTED} ${FILENAME}
RESULT="$(stat --format=%X ${FILENAME})"
if [ "${RESULT}" != "${EXPECTED}" ]
then
Fail "test3: Got=${RESULT} Expected=${EXPECTED}"
fi
Unmount