libcryfs/test/fspp/fuse/utimens/testutils/FuseUtimensTest.h

23 lines
714 B
C
Raw Normal View History

2014-11-28 18:38:24 +01:00
#pragma once
2015-10-15 13:04:57 +02:00
#ifndef MESSMER_FSPP_TEST_FUSE_UTIMENS_TESTUTILS_FUSEUTIMENSTEST_H_
#define MESSMER_FSPP_TEST_FUSE_UTIMENS_TESTUTILS_FUSEUTIMENSTEST_H_
2014-11-28 18:38:24 +01:00
2015-02-17 00:48:49 +01:00
#include "../../../testutils/FuseTest.h"
2014-11-28 18:38:24 +01:00
class FuseUtimensTest: public FuseTest {
public:
const char *FILENAME = "/myfile";
2016-02-09 09:36:07 +01:00
timespec TIMEVALUE = makeTimespec(0,0);
2014-11-28 18:38:24 +01:00
2016-02-09 09:36:07 +01:00
void Utimens(const char *filename, timespec lastAccessTime, timespec lastModificationTime);
int UtimensReturnError(const char *filename, timespec lastAccessTime, timespec lastModificationTime);
2014-11-28 18:38:24 +01:00
static struct timespec makeTimespec(time_t tv_sec, long tv_nsec);
};
MATCHER_P(TimeSpecEq, expected, "") {
2016-02-09 09:36:07 +01:00
return expected.tv_sec == arg.tv_sec && expected.tv_nsec == arg.tv_nsec;
2014-11-28 18:38:24 +01:00
}
#endif