From 74383ba40529ef05346f617c846b55a73da1810c Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 19 Apr 2017 17:47:15 -0400 Subject: tests/xattrs: Skip on filesystems with no user xattr support Like tmpfs. See: https://github.com/flatpak/flatpak/issues/686 --- tests/test-libglnx-xattrs.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test-libglnx-xattrs.c b/tests/test-libglnx-xattrs.c index 0b21133..b6f0ac6 100644 --- a/tests/test-libglnx-xattrs.c +++ b/tests/test-libglnx-xattrs.c @@ -244,6 +244,21 @@ test_xattr_races (void) if (!glnx_opendirat (AT_FDCWD, tmpdir, TRUE, &dfd, error)) goto out; + /* Support people building/testing on tmpfs https://github.com/flatpak/flatpak/issues/686 */ + if (fsetxattr (dfd, "user.test", "novalue", strlen ("novalue"), 0) < 0) + { + if (errno == EOPNOTSUPP) + { + g_test_skip ("no xattr support"); + return; + } + else + { + glnx_set_error_from_errno (error); + goto out; + } + } + for (guint i = 0; i < nprocs; i++) { struct XattrWorker *worker = &wdata[i]; -- cgit v1.2.1