summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-02-15 21:45:59 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2016-02-15 21:45:59 +0000
commit98593639840046dba68dad0d0cd3fd6130b831d1 (patch)
tree3e8c69f9fe8ed91bbc2838bf37da341ff9d2ad45
parentTest mknod behaviour (diff)
downloadnetfs-98593639840046dba68dad0d0cd3fd6130b831d1.tar.bz2
netfs-98593639840046dba68dad0d0cd3fd6130b831d1.tar.xz
netfs-98593639840046dba68dad0d0cd3fd6130b831d1.zip
Test error cases
-rw-r--r--netfs/unittests/testCore.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/netfs/unittests/testCore.cpp b/netfs/unittests/testCore.cpp
index 69c8f70..59c7d70 100644
--- a/netfs/unittests/testCore.cpp
+++ b/netfs/unittests/testCore.cpp
@@ -245,6 +245,7 @@ BOOST_AUTO_TEST_CASE( symlinks )
{
char buf[BUFSIZ];
BOOST_REQUIRE_EQUAL(fuse->symlink("/test2", "/test3"), 0);
+ BOOST_REQUIRE_EQUAL(fuse->symlink("/test2", "/test3"), -EEXIST);
BOOST_REQUIRE_EQUAL(fuse->readlink("/test3", buf, BUFSIZ), 0);
BOOST_REQUIRE_EQUAL("/test2", buf);
BOOST_REQUIRE_EQUAL(fuse->unlink("/test3"), 0);
@@ -290,6 +291,7 @@ BOOST_AUTO_TEST_CASE( mknod )
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_REQUIRE_EQUAL(fuse->unlink("/nod"), -ENOENT);
}
BOOST_AUTO_TEST_SUITE_END();