Whamcloud - gitweb
LU-746 test: obdfilter-survey FAIL hndls expected >8, have 2
[fs/lustre-release.git] / lustre / tests / createtest.c
index 1e0c112..3795f05 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -93,18 +93,27 @@ int main(int argc, char *argv[])
                                        argv[0], name, st.st_mode, mode);
                                exit(12);
                        }
+                       if (i == S_IFCHR || i == S_IFBLK) {
+                               if (st.st_rdev != 0x1234) {
+                                       fprintf(stderr, "%s: ERROR rdev %s: "
+                                               "%llu != 0x1234",
+                                               argv[0], name,
+                                               (unsigned long long)st.st_rdev);
+                                       exit(13);
+                               }
+                       }
                        rc = unlink(name);
                        if (rc < 0) {
                                fprintf(stderr, "%s: ERROR unlink %s: %s",
                                        argv[0], name, strerror(errno));
-                               exit(13);
+                               exit(14);
                        }
                        break;
                default:
                        if (rc == 0) {
                                fprintf(stderr, "%s: ERROR: %s created\n",
                                        argv[0], name);
-                               exit(14);
+                               exit(15);
                        }
                }
        }