]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test_libcephfs: fix xattr test
authorSage Weil <sage@inktank.com>
Wed, 30 Jan 2013 19:32:23 +0000 (11:32 -0800)
committerSage Weil <sage@inktank.com>
Sun, 10 Feb 2013 04:41:24 +0000 (20:41 -0800)
Ignore the ceph.*.layout xattrs.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit b0d4dd21c7be86eb47728a4702a3c67ca44424ac)

src/test/libcephfs/test.cc

index 67bf78c82afa245205a2a13825ee3d79194df364..b3cdf507294a38db7e5715badf5239401b2f9f9a 100644 (file)
@@ -402,6 +402,14 @@ TEST(LibCephFS, Xattrs) {
   char *n;
   i = 'a';
   while(len > 0) {
+    // skip/ignore the dir layout
+    if (strcmp(p, "ceph.dir.layout") == 0 ||
+       strcmp(p, "ceph.file.layout") == 0) {
+      len -= strlen(p) + 1;
+      p += strlen(p) + 1;
+      continue;
+    }
+
     sprintf(xattrk, "user.test_xattr_%c", i);
     ASSERT_STREQ(p, xattrk);