From 116bc832a3d7c70a27591c4fe65f276dd1a5b3ff Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 7 Oct 2015 20:25:59 -0400 Subject: [PATCH] ceph_test_libcephfs: parse env properly (access) Signed-off-by: Sage Weil --- src/test/libcephfs/access.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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")); -- 2.47.3