From b94246b28297368cb8276555e75fe5ed064d9f45 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 26 Oct 2017 20:16:17 +0100 Subject: Improve permissions tests on symlink --- netfs/unittests/testCore.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netfs/unittests/testCore.cpp b/netfs/unittests/testCore.cpp index 3e64d40..4b12871 100644 --- a/netfs/unittests/testCore.cpp +++ b/netfs/unittests/testCore.cpp @@ -287,6 +287,9 @@ BOOST_AUTO_TEST_CASE( symlinks ) BOOST_REQUIRE_EQUAL("/test2", buf); BOOST_REQUIRE_EQUAL(fuse->unlink("/test3"), 0); BOOST_REQUIRE_EQUAL(fuse->unlink("/test3"), -ENOENT); + disableWriteOnDir(fuse, "/"); + BOOST_REQUIRE_EQUAL(fuse->symlink("/test2", "/test3"), -EACCES); + enableWriteOnDir(fuse, "/"); } BOOST_AUTO_TEST_CASE( access ) -- cgit v1.2.3