]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/libcephfs: Expand buffer slightly
authorAdam C. Emerson <aemerson@redhat.com>
Wed, 9 May 2018 01:03:29 +0000 (21:03 -0400)
committerNathan Cutler <ncutler@suse.com>
Fri, 18 May 2018 13:30:35 +0000 (15:30 +0200)
So the snprintf output isn't truncated.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 5bfcd2335b6b807301d75cb545dd661beca18a72)

src/test/libcephfs/acl.cc

index 004c053e830e6329badef80f0db9ba095ad48661..a9a800d00aae8c21e87dea96a0ee12d0e4ee3531 100644 (file)
@@ -240,7 +240,7 @@ TEST(ACL, DefaultACL) {
   // set default acl
   ASSERT_EQ(ceph_setxattr(cmount, test_dir1, ACL_EA_DEFAULT, acl1_buf, acl_buf_size, 0), 0);
 
-  char test_dir2[256];
+  char test_dir2[262];
   sprintf(test_dir2, "%s/dir2", test_dir1);
   ASSERT_EQ(ceph_mkdir(cmount, test_dir2, 0755), 0);
 
@@ -258,7 +258,7 @@ TEST(ACL, DefaultACL) {
     ASSERT_EQ(check_acl_and_mode(acl2_buf, acl_buf_size, stx.stx_mode), 0);
   }
 
-  char test_file1[256];
+  char test_file1[262];
   sprintf(test_file1, "%s/file1", test_dir1);
   int fd = ceph_open(cmount, test_file1, O_CREAT|O_RDWR, 0666);
   ASSERT_GT(fd, 0);