diff mbox

[2/2] updated test to cover "." directory stat

Message ID 1305178007-2927-3-git-send-email-brchrisman@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Brian Chrisman May 12, 2011, 5:26 a.m. UTC
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
---
 src/client/testceph.cc |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/src/client/testceph.cc b/src/client/testceph.cc
index da4b7a2..520fa75 100644
--- a/src/client/testceph.cc
+++ b/src/client/testceph.cc
@@ -174,6 +174,23 @@  int main(int argc, const char **argv)
   if (strncmp((char *) aybabtu, aybabtu_reference,7)) {
     cerr << "ceph_getxattr error: no match (" << aybabtu << ") should be (" << aybabtu_reference << cpp_strerror(ret) << std::endl;
   }
+  cout << "Attempting lstat on '/.'" << std::endl;
+  ret = ceph_lstat(cmount, "/.", &stbuf);
+  if (ret) {
+    cerr << "ceph_lstat error: " << cpp_strerror(ret) << std::endl;
+    return 1;
+  } else {
+    cout << "ceph_lstat: success" << std::endl;
+  }
+  cout << "Attempting lstat on '.'" << std::endl;
+  ret = ceph_lstat(cmount, ".", &stbuf);
+  if (ret) {
+    cerr << "ceph_lstat error: " << cpp_strerror(ret) << std::endl;
+    return 1;
+  } else {
+    cout << "ceph_lstat: success" << std::endl;
+  }
+
 
   ceph_shutdown(cmount);