summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netfs/unittests/testCore.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/netfs/unittests/testCore.cpp b/netfs/unittests/testCore.cpp
index fb41f65..69c8f70 100644
--- a/netfs/unittests/testCore.cpp
+++ b/netfs/unittests/testCore.cpp
@@ -281,6 +281,17 @@ BOOST_AUTO_TEST_CASE( access )
BOOST_REQUIRE_EQUAL(fuse->rmdir("/dir"), 0);
}
+BOOST_AUTO_TEST_CASE( mknod )
+{
+ BOOST_REQUIRE_EQUAL(fuse->mknod("/nod", 0600 | S_IFIFO, 0), 0);
+ BOOST_REQUIRE_EQUAL(fuse->mknod("/nod", 0600 | S_IFIFO, 0), -EEXIST);
+ struct stat st;
+ memset(&st, 0, sizeof(st));
+ BOOST_REQUIRE_EQUAL(fuse->getattr("/nod", &st), 0);
+ BOOST_REQUIRE_EQUAL(st.st_mode, 0600 | S_IFIFO);
+ BOOST_REQUIRE_EQUAL(fuse->unlink("/nod"), 0);
+}
+
BOOST_AUTO_TEST_SUITE_END();
BOOST_AUTO_TEST_CASE( testNoAuthNoPass )