From: Jeff Layton Date: Tue, 16 Mar 2021 15:14:28 +0000 (-0400) Subject: test: add test for removing non-existent xattr X-Git-Tag: v16.2.0~14^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=5f193a9955e4364215a3b9dc4134da8767903e7e;p=ceph.git test: add test for removing non-existent xattr We should get back -ENODATA. Signed-off-by: Jeff Layton (cherry picked from commit b94b668b7e340fa660462b75c97ab77dda9d5273) --- diff --git a/src/test/libcephfs/test.cc b/src/test/libcephfs/test.cc index e74e997409794..f14a4605e1371 100644 --- a/src/test/libcephfs/test.cc +++ b/src/test/libcephfs/test.cc @@ -540,6 +540,9 @@ TEST(LibCephFS, Xattrs) { int fd = ceph_open(cmount, test_xattr_file, O_CREAT, 0666); ASSERT_GT(fd, 0); + // test removing non-existent xattr + ASSERT_EQ(-ENODATA, ceph_removexattr(cmount, test_xattr_file, "user.nosuchxattr")); + char i = 'a'; char xattrk[128]; char xattrv[128];