From 9640e454bc862280a26d82ff3c992ffe47c5730e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 6 Dec 2014 16:41:00 +0000 Subject: Don't fail tests if running on a NetBSD system with no xattr support. --- test/bbackupd/testbbackupd.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp index 416aa139..18ea146a 100644 --- a/test/bbackupd/testbbackupd.cpp +++ b/test/bbackupd/testbbackupd.cpp @@ -116,6 +116,16 @@ bool readxattr_into_map(const char *filename, std::map ssize_t xattrNamesBufferSize = llistxattr(filename, NULL, 0); if(xattrNamesBufferSize < 0) { +#if HAVE_DECL_ENOTSUP + if(errno == ENOTSUP) + { + // Pretend that it worked, leaving an empty map, so + // that the rest of the attribute comparison will + // proceed as normal. + return true; + } +#endif // HAVE_DECL_ENOTSUP + return false; } else if(xattrNamesBufferSize > 0) -- cgit v1.2.3