summaryrefslogtreecommitdiff
path: root/test/bbackupd/testbbackupd.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-12-06 16:41:00 +0000
committerChris Wilson <chris+github@qwirx.com>2014-12-06 16:41:00 +0000
commit9640e454bc862280a26d82ff3c992ffe47c5730e (patch)
tree3ca66403b3253f892d870683d5b790c903a0aaba /test/bbackupd/testbbackupd.cpp
parent830646f3725527e5c101f0e53e4c02ba2300df52 (diff)
Don't fail tests if running on a NetBSD system with no xattr support.
Diffstat (limited to 'test/bbackupd/testbbackupd.cpp')
-rw-r--r--test/bbackupd/testbbackupd.cpp10
1 files changed, 10 insertions, 0 deletions
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<std::string,std::string>
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)