diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-02-15 21:43:02 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-02-15 21:43:02 +0000 |
commit | 7b5f5fbc933a935e8e436d719e37e63922c420b2 (patch) | |
tree | 3eab0c3f5e90fcb4831e8880ffb6f488c48ac293 | |
parent | Test permissions behaviour, fix write permissions check (might need further w... (diff) | |
download | netfs-7b5f5fbc933a935e8e436d719e37e63922c420b2.tar.bz2 netfs-7b5f5fbc933a935e8e436d719e37e63922c420b2.tar.xz netfs-7b5f5fbc933a935e8e436d719e37e63922c420b2.zip |
Test mknod behaviour
-rw-r--r-- | netfs/unittests/testCore.cpp | 11 |
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 ) |