summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-02-19 01:16:34 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-02-19 01:16:34 +0000
commit67cc0d9695b1c5ae5d9c7da16359aca1806556ba (patch)
treef64ae79701366ff885a9b09c171fcad99c19c4f7
parentVirtualise fues_main so that the ut framework can get access to the operation... (diff)
downloadnetfs-67cc0d9695b1c5ae5d9c7da16359aca1806556ba.tar.bz2
netfs-67cc0d9695b1c5ae5d9c7da16359aca1806556ba.tar.xz
netfs-67cc0d9695b1c5ae5d9c7da16359aca1806556ba.zip
Initialise the test context with sensible values
-rw-r--r--netfs/unittests/testCore.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/netfs/unittests/testCore.cpp b/netfs/unittests/testCore.cpp
index 3be4ed0..c1afbe3 100644
--- a/netfs/unittests/testCore.cpp
+++ b/netfs/unittests/testCore.cpp
@@ -41,6 +41,9 @@ class FuseMock : public NetFS::FuseApp {
NetFS::FuseApp(argc, argv)
{
::memset(&context, 0, sizeof(fuse_context));
+ context.pid = getpid();
+ context.uid = getuid();
+ context.gid = getgid();
}
struct fuse_context * fuse_get_context() override