Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / src / tests / threads / priority-donate-one.ck
diff --git a/src/tests/threads/priority-donate-one.ck b/src/tests/threads/priority-donate-one.ck
new file mode 100644 (file)
index 0000000..ff019a2
--- /dev/null
@@ -0,0 +1,16 @@
+# -*- perl -*-
+use strict;
+use warnings;
+use tests::tests;
+check_expected ([<<'EOF']);
+(priority-donate-one) begin
+(priority-donate-one) This thread should have priority 30.  Actual priority: 30.
+(priority-donate-one) This thread should have priority 29.  Actual priority: 29.
+(priority-donate-one) acquire2: got the lock
+(priority-donate-one) acquire2: done
+(priority-donate-one) acquire1: got the lock
+(priority-donate-one) acquire1: done
+(priority-donate-one) acquire2, acquire1 must already have finished, in that order.
+(priority-donate-one) This should be the last line before finishing this test.
+(priority-donate-one) end
+EOF