Mark Linux 2.4 as unsupported
[openafs.git] / tests / opr / uuid-t.c
index e66721e..276dea8 100644 (file)
@@ -23,6 +23,8 @@ main(int argc, char **argv)
     int version;
     struct opr_uuid_unpacked raw;
 
+    plan(18);
+
     memset(&uuidC, 0, sizeof(opr_uuid_t));
 
     ok(opr_uuid_isNil(&uuidC), "opr_uuid_isNil(nilUuid) works");
@@ -35,9 +37,10 @@ main(int argc, char **argv)
     is_int(1187447773, opr_uuid_hash(&uuidA), "opr_uuid_hash(A) works");
     is_int(1251907497, opr_uuid_hash(&uuidB), "opr_uuid_hash(B) works");
 
-    opr_uuid_toString(&uuidA, &str);
+    ok(!opr_uuid_toString(&uuidA, &str), "opr_uuid_toString(uuidA) works");
+    ok(str != NULL, "... and result is not NULL");
     is_string("4f449447-76ba-472c-971a-866bc0101a4b", str,
-             "opr_uuid_toString(uuidA) works");
+             "... and string is correct");
     opr_uuid_freeString(str);
 
     is_int(0, opr_uuid_fromString(&uuidC, "4F449447-76BA-472C-971A-866BC0101A4B"),
@@ -52,7 +55,7 @@ main(int argc, char **argv)
     memset(&uuidC, 0, sizeof(opr_uuid_t));
     opr_uuid_create(&uuidC);
     ok(!opr_uuid_isNil(&uuidC), "opr_uuid_create makes non-nil UUID");
-    is_int(0x80, uuidC.data[8] & 0xB0, "variant is DCE as expected");
+    is_int(0x80, uuidC.data[8] & 0x80, "variant is DCE as expected");
     version = (uuidC.data[6] & 0xF0) >> 4;
     ok(version >=1 && version <=5, "version %d is in expected range", version);