From: Rohan Mars Date: Tue, 27 Oct 2015 03:39:14 +0000 (-0700) Subject: fix sem_open() call to be compliant X-Git-Tag: v10.0.1~63^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=41eff6b84336cbd7844e99b55dc1e8b9b6095c01;p=ceph.git fix sem_open() call to be compliant Signed-off-by: Rohan Mars --- diff --git a/src/test/librados/aio.cc b/src/test/librados/aio.cc index 6971715bea5b..cbae8770c86f 100644 --- a/src/test/librados/aio.cc +++ b/src/test/librados/aio.cc @@ -41,7 +41,7 @@ public: std::string init() { int ret; - if (SEM_FAILED == (m_sem = sem_open("test_aio_sem", O_CREAT, 0644, 0))) { + if (SEM_FAILED == (m_sem = sem_open("/test_aio_sem", O_CREAT, 0644, 0))) { int err = errno; ostringstream oss; oss << "sem_open failed: " << cpp_strerror(err); @@ -98,7 +98,7 @@ public: std::string init() { int ret; - if (SEM_FAILED == (m_sem = sem_open("test_aio_sem", O_CREAT, 0644, 0))) { + if (SEM_FAILED == (m_sem = sem_open("/test_aio_sem", O_CREAT, 0644, 0))) { int err = errno; ostringstream oss; oss << "sem_open failed: " << cpp_strerror(err); @@ -1755,7 +1755,7 @@ public: std::string init() { int ret; - if (SEM_FAILED == (m_sem = sem_open("test_aio_sem", O_CREAT, 0644, 0))) { + if (SEM_FAILED == (m_sem = sem_open("/test_aio_sem", O_CREAT, 0644, 0))) { int err = errno; ostringstream oss; oss << "sem_open failed: " << cpp_strerror(err); @@ -1812,7 +1812,7 @@ public: std::string init() { int ret; - if (SEM_FAILED == (m_sem = sem_open("test_aio_sem", O_CREAT, 0644, 0))) { + if (SEM_FAILED == (m_sem = sem_open("/test_aio_sem", O_CREAT, 0644, 0))) { int err = errno; ostringstream oss; oss << "sem_open failed: " << cpp_strerror(err); diff --git a/src/test/librados/watch_notify.cc b/src/test/librados/watch_notify.cc index 13652413c81a..c191a38d6e96 100644 --- a/src/test/librados/watch_notify.cc +++ b/src/test/librados/watch_notify.cc @@ -104,7 +104,7 @@ public: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" TEST_F(LibRadosWatchNotify, WatchNotify) { - ASSERT_NE(SEM_FAILED, (sem = sem_open("test_watch_notify_sem", O_CREAT, 0644, 0))); + ASSERT_NE(SEM_FAILED, (sem = sem_open("/test_watch_notify_sem", O_CREAT, 0644, 0))); char buf[128]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -124,7 +124,7 @@ TEST_F(LibRadosWatchNotify, WatchNotify) { } TEST_P(LibRadosWatchNotifyPP, WatchNotify) { - ASSERT_NE(SEM_FAILED, (sem = sem_open("test_watch_notify_sem", O_CREAT, 0644, 0))); + ASSERT_NE(SEM_FAILED, (sem = sem_open("/test_watch_notify_sem", O_CREAT, 0644, 0))); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -145,7 +145,7 @@ TEST_P(LibRadosWatchNotifyPP, WatchNotify) { } TEST_F(LibRadosWatchNotifyEC, WatchNotify) { - ASSERT_NE(SEM_FAILED, (sem = sem_open("test_watch_notify_sem", O_CREAT, 0644, 0))); + ASSERT_NE(SEM_FAILED, (sem = sem_open("/test_watch_notify_sem", O_CREAT, 0644, 0))); char buf[128]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -160,7 +160,7 @@ TEST_F(LibRadosWatchNotifyEC, WatchNotify) { } TEST_F(LibRadosWatchNotifyECPP, WatchNotify) { - ASSERT_NE(SEM_FAILED, (sem = sem_open("test_watch_notify_sem", O_CREAT, 0644, 0))); + ASSERT_NE(SEM_FAILED, (sem = sem_open("/test_watch_notify_sem", O_CREAT, 0644, 0))); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -183,7 +183,7 @@ TEST_F(LibRadosWatchNotifyECPP, WatchNotify) { // -- TEST_P(LibRadosWatchNotifyPP, WatchNotifyTimeout) { - ASSERT_NE(SEM_FAILED, (sem = sem_open("test_watch_notify_sem", O_CREAT, 0644, 0))); + ASSERT_NE(SEM_FAILED, (sem = sem_open("/test_watch_notify_sem", O_CREAT, 0644, 0))); ioctx.set_notify_timeout(1); uint64_t handle; WatchNotifyTestCtx ctx; @@ -200,7 +200,7 @@ TEST_P(LibRadosWatchNotifyPP, WatchNotifyTimeout) { } TEST_F(LibRadosWatchNotifyECPP, WatchNotifyTimeout) { - ASSERT_NE(SEM_FAILED, (sem = sem_open("test_watch_notify_sem", O_CREAT, 0644, 0))); + ASSERT_NE(SEM_FAILED, (sem = sem_open("/test_watch_notify_sem", O_CREAT, 0644, 0))); ioctx.set_notify_timeout(1); uint64_t handle; WatchNotifyTestCtx ctx;