Whamcloud - gitweb
LU-1538 tests: fix test cases when OST is full
[fs/lustre-release.git] / lustre / tests / multiop.c
old mode 100755 (executable)
new mode 100644 (file)
index 7e0dbfe..9ed0522
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,8 +47,8 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <semaphore.h>
-#include <libcfs/libcfs.h>
-#include <lustre/liblustreapi.h>
+
+#include <lustre/lustreapi.h>
 
 #define T1 "write data before unlink\n"
 #define T2 "write data after unlink\n"
@@ -371,9 +369,12 @@ int main(int argc, char **argv)
                                         perror("read");
                                         exit(save_errno);
                                 }
-                                if (rc < len)
-                                        fprintf(stderr, "short read: %u/%u\n",
-                                                rc, len);
+                               if (rc < len) {
+                                       fprintf(stderr, "short read: %u/%u\n",
+                                               rc, len);
+                                       if (rc == 0)
+                                               exit(ENODATA);
+                               }
                                 len -= rc;
                                 if (verbose >= 2)
                                         printf("%.*s\n", rc, buf_align);