summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-11-21 08:06:09 +0100
committerJürg Billeter <j@bitron.ch>2019-12-03 12:06:31 +0000
commitb10a1cf327501271ccdeb82be9ff3eca7acf4898 (patch)
treeb6274204bb212c271770127b3868caae12b5e3f0
parentae63515abb8b294eba0a5a64a05acb1439b299f0 (diff)
downloadbuildstream-b10a1cf327501271ccdeb82be9ff3eca7acf4898.tar.gz
tests/frontend/buildcheckout.py: Cannot hardlink with CASD_SEPARATE_USER
Linux does not allow hardlinks to read-only files of other users by default since Linux 3.6 (see /proc/sys/fs/protected_hardlinks).
-rw-r--r--tests/frontend/buildcheckout.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py
index ffe564e81..d6a216daf 100644
--- a/tests/frontend/buildcheckout.py
+++ b/tests/frontend/buildcheckout.py
@@ -10,7 +10,7 @@ import pytest
from buildstream.testing import cli # pylint: disable=unused-import
from buildstream.testing import create_repo
-from buildstream.testing._utils.site import IS_WINDOWS
+from buildstream.testing._utils.site import IS_WINDOWS, CASD_SEPARATE_USER
from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream import utils
@@ -35,6 +35,9 @@ def strict_args(args, strict):
[("strict", "copies"), ("strict", "hardlinks"), ("non-strict", "copies"), ("non-strict", "hardlinks"),],
)
def test_build_checkout(datafiles, cli, strict, hardlinks):
+ if CASD_SEPARATE_USER and hardlinks == "hardlinks":
+ pytest.xfail("Cannot hardlink with buildbox-casd running as a separate user")
+
project = str(datafiles)
checkout = os.path.join(cli.directory, "checkout")
@@ -580,6 +583,9 @@ def test_build_checkout_nonempty(datafiles, cli, hardlinks):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.parametrize("hardlinks", [("copies"), ("hardlinks")])
def test_build_checkout_force(datafiles, cli, hardlinks):
+ if CASD_SEPARATE_USER and hardlinks == "hardlinks":
+ pytest.xfail("Cannot hardlink with buildbox-casd running as a separate user")
+
project = str(datafiles)
checkout = os.path.join(cli.directory, "checkout")
filename = os.path.join(checkout, "file.txt")