From dc00578b068517fcfd7db07436f920622b042f0c Mon Sep 17 00:00:00 2001 From: Geoffrey Challen Date: Mon, 15 Feb 2016 08:42:54 -0500 Subject: [PATCH] Forgot rwt5. --- kern/include/test.h | 1 + kern/main/menu.c | 2 ++ kern/test/rwtest.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/kern/include/test.h b/kern/include/test.h index 25b901e..6c96f48 100644 --- a/kern/include/test.h +++ b/kern/include/test.h @@ -69,6 +69,7 @@ int rwtest(int, char **); int rwtest2(int, char **); int rwtest3(int, char **); int rwtest4(int, char **); +int rwtest5(int, char **); /* semaphore unit tests */ int semu1(int, char **); diff --git a/kern/main/menu.c b/kern/main/menu.c index a36ec78..0eb34ad 100644 --- a/kern/main/menu.c +++ b/kern/main/menu.c @@ -499,6 +499,7 @@ static const char *testmenu[] = { "[rwt2] RW lock test 2 (1?) ", "[rwt3] RW lock test 3 (1?) ", "[rwt4] RW lock test 4 (1?) ", + "[rwt5] RW lock test 5 (1?) ", #if OPT_SYNCHPROBS "[sp1] Whalemating test (1) ", "[sp2] Stoplight test (1) ", @@ -644,6 +645,7 @@ static struct { { "rwt2", rwtest2 }, { "rwt3", rwtest3 }, { "rwt4", rwtest4 }, + { "rwt5", rwtest5 }, #if OPT_SYNCHPROBS { "sp1", whalemating }, { "sp2", stoplight }, diff --git a/kern/test/rwtest.c b/kern/test/rwtest.c index 0c9925d..1c272dc 100644 --- a/kern/test/rwtest.c +++ b/kern/test/rwtest.c @@ -12,6 +12,10 @@ #include #include +/* + * Use these stubs to test your reader-writer locks. + */ + int rwtest(int nargs, char **args) { (void)nargs; (void)args; @@ -51,3 +55,13 @@ int rwtest4(int nargs, char **args) { return 0; } + +int rwtest5(int nargs, char **args) { + (void)nargs; + (void)args; + + kprintf_n("rwt5 unimplemented\n"); + success(FAIL, SECRET, "rwt5"); + + return 0; +}