From: Sage Weil Date: Thu, 8 Oct 2015 00:25:59 +0000 (-0400) Subject: ceph_test_libcephfs: parse env properly (access) X-Git-Tag: v10.0.0~115 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=116bc832a3d7c70a27591c4fe65f276dd1a5b3ff;p=ceph.git ceph_test_libcephfs: parse env properly (access) Signed-off-by: Sage Weil --- diff --git a/src/test/libcephfs/access.cc b/src/test/libcephfs/access.cc index 5dfacea767db..ac8cbd1674fd 100644 --- a/src/test/libcephfs/access.cc +++ b/src/test/libcephfs/access.cc @@ -81,8 +81,8 @@ TEST(AccessTest, Foo) { // admin mount to set up test struct ceph_mount_info *admin; ASSERT_EQ(0, ceph_create(&admin, NULL)); - ASSERT_EQ(0, ceph_conf_parse_env(admin, NULL)); ASSERT_EQ(0, ceph_conf_read_file(admin, NULL)); + ASSERT_EQ(0, ceph_conf_parse_env(admin, NULL)); ASSERT_EQ(0, ceph_mount(admin, "/")); ASSERT_EQ(0, ceph_mkdir(admin, dir.c_str(), 0755)); @@ -96,8 +96,8 @@ TEST(AccessTest, Foo) { struct ceph_mount_info *cmount; ASSERT_EQ(0, ceph_create(&cmount, user.c_str())); - ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL)); ASSERT_EQ(0, ceph_conf_read_file(cmount, NULL)); + ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL)); ASSERT_EQ(0, ceph_conf_set(cmount, "key", key.c_str())); ASSERT_EQ(0, ceph_mount(cmount, "/")); @@ -114,8 +114,8 @@ TEST(AccessTest, Path) { string user = "libcephfs_path_test." + stringify(rand()); struct ceph_mount_info *admin; ASSERT_EQ(0, ceph_create(&admin, NULL)); - ASSERT_EQ(0, ceph_conf_parse_env(admin, NULL)); ASSERT_EQ(0, ceph_conf_read_file(admin, NULL)); + ASSERT_EQ(0, ceph_conf_parse_env(admin, NULL)); ASSERT_EQ(0, ceph_mount(admin, "/")); ASSERT_EQ(0, ceph_mkdir(admin, good.c_str(), 0755)); ASSERT_EQ(0, ceph_mkdir(admin, string(good + "/p").c_str(), 0755)); @@ -138,8 +138,8 @@ TEST(AccessTest, Path) { struct ceph_mount_info *cmount; ASSERT_EQ(0, ceph_create(&cmount, user.c_str())); - ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL)); ASSERT_EQ(0, ceph_conf_read_file(cmount, NULL)); + ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL)); ASSERT_EQ(0, ceph_conf_set(cmount, "key", key.c_str())); ASSERT_EQ(0, ceph_mount(cmount, "/")); @@ -200,8 +200,8 @@ TEST(AccessTest, ReadOnly) { string user = "libcephfs_readonly_test." + stringify(rand()); struct ceph_mount_info *admin; ASSERT_EQ(0, ceph_create(&admin, NULL)); - ASSERT_EQ(0, ceph_conf_parse_env(admin, NULL)); ASSERT_EQ(0, ceph_conf_read_file(admin, NULL)); + ASSERT_EQ(0, ceph_conf_parse_env(admin, NULL)); ASSERT_EQ(0, ceph_mount(admin, "/")); ASSERT_EQ(0, ceph_mkdir(admin, dir.c_str(), 0755)); int fd = ceph_open(admin, string(dir + "/out").c_str(), O_CREAT|O_WRONLY, 0755); @@ -217,8 +217,8 @@ TEST(AccessTest, ReadOnly) { struct ceph_mount_info *cmount; ASSERT_EQ(0, ceph_create(&cmount, user.c_str())); - ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL)); ASSERT_EQ(0, ceph_conf_read_file(cmount, NULL)); + ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL)); ASSERT_EQ(0, ceph_conf_set(cmount, "key", key.c_str())); ASSERT_EQ(0, ceph_mount(cmount, "/")); @@ -245,8 +245,8 @@ TEST(AccessTest, User) { // admin mount to set up test struct ceph_mount_info *admin; ASSERT_EQ(0, ceph_create(&admin, NULL)); - ASSERT_EQ(0, ceph_conf_parse_env(admin, NULL)); ASSERT_EQ(0, ceph_conf_read_file(admin, NULL)); + ASSERT_EQ(0, ceph_conf_parse_env(admin, NULL)); ASSERT_EQ(0, ceph_mount(admin, "/")); ASSERT_EQ(0, ceph_mkdir(admin, dir.c_str(), 0755)); @@ -260,8 +260,8 @@ TEST(AccessTest, User) { struct ceph_mount_info *cmount; ASSERT_EQ(0, ceph_create(&cmount, user.c_str())); - ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL)); ASSERT_EQ(0, ceph_conf_read_file(cmount, NULL)); + ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL)); ASSERT_EQ(0, ceph_conf_set(cmount, "key", key.c_str())); ASSERT_EQ(-EACCES, ceph_mount(cmount, "/")); ASSERT_EQ(0, ceph_conf_set(cmount, "client_mount_uid", "123"));