From 0cd341c2485af8afac2abbddc6971a8fe83ae229 Mon Sep 17 00:00:00 2001 From: Guru Prasad Srinivasa Date: Tue, 1 Mar 2016 17:47:52 -0500 Subject: [PATCH] Updated badcall tests to just print success --- userland/testbin/badcall/bad_chdir.c | 3 ++- userland/testbin/badcall/bad_close.c | 3 ++- userland/testbin/badcall/bad_dup2.c | 3 ++- userland/testbin/badcall/bad_execv.c | 3 ++- userland/testbin/badcall/bad_fsync.c | 3 ++- userland/testbin/badcall/bad_ftruncate.c | 3 ++- userland/testbin/badcall/bad_getcwd.c | 3 ++- userland/testbin/badcall/bad_getdirentry.c | 3 ++- userland/testbin/badcall/bad_ioctl.c | 3 ++- userland/testbin/badcall/bad_link.c | 3 ++- userland/testbin/badcall/bad_lseek.c | 3 ++- userland/testbin/badcall/bad_mkdir.c | 3 ++- userland/testbin/badcall/bad_open.c | 3 ++- userland/testbin/badcall/bad_pipe.c | 3 ++- userland/testbin/badcall/bad_read.c | 3 ++- userland/testbin/badcall/bad_readlink.c | 3 ++- userland/testbin/badcall/bad_reboot.c | 3 ++- userland/testbin/badcall/bad_remove.c | 3 ++- userland/testbin/badcall/bad_rename.c | 3 ++- userland/testbin/badcall/bad_rmdir.c | 3 ++- userland/testbin/badcall/bad_sbrk.c | 3 ++- userland/testbin/badcall/bad_stat.c | 9 ++++++--- userland/testbin/badcall/bad_symlink.c | 3 ++- userland/testbin/badcall/bad_time.c | 3 ++- userland/testbin/badcall/bad_waitpid.c | 3 ++- userland/testbin/badcall/bad_write.c | 3 ++- 26 files changed, 56 insertions(+), 28 deletions(-) diff --git a/userland/testbin/badcall/bad_chdir.c b/userland/testbin/badcall/bad_chdir.c index 7c555cc..ec057c2 100644 --- a/userland/testbin/badcall/bad_chdir.c +++ b/userland/testbin/badcall/bad_chdir.c @@ -62,6 +62,7 @@ test_chdir(void) result = chdir_empty(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-chdir", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_close.c b/userland/testbin/badcall/bad_close.c index 23aa833..3900200 100644 --- a/userland/testbin/badcall/bad_close.c +++ b/userland/testbin/badcall/bad_close.c @@ -39,5 +39,6 @@ test_close(void) int ntests = 0, lost_points = 0; test_close_fd(&ntests, &lost_points); - partial_credit(SECRET, "/testbin/badcall-close", ntests- lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_dup2.c b/userland/testbin/badcall/bad_dup2.c index 212e4b1..86a36c7 100644 --- a/userland/testbin/badcall/bad_dup2.c +++ b/userland/testbin/badcall/bad_dup2.c @@ -157,5 +157,6 @@ test_dup2(void) failure = dup2_self(); handle_result(failure, &lost_points); - partial_credit(SECRET, "/testbin/badcall-dup2", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_execv.c b/userland/testbin/badcall/bad_execv.c index 06b3dc7..5551e9b 100644 --- a/userland/testbin/badcall/bad_execv.c +++ b/userland/testbin/badcall/bad_execv.c @@ -217,5 +217,6 @@ test_execv(void) result = exec_onearg(KERN_PTR, "exec with kernel pointer arg"); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-execv", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_fsync.c b/userland/testbin/badcall/bad_fsync.c index 2d6d8a6..6322a99 100644 --- a/userland/testbin/badcall/bad_fsync.c +++ b/userland/testbin/badcall/bad_fsync.c @@ -40,6 +40,7 @@ test_fsync(void) test_fsync_fd(&ntests, &lost_points); - partial_credit(SECRET, "/testbin/badcall-fsync", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_ftruncate.c b/userland/testbin/badcall/bad_ftruncate.c index 114832f..cf21fff 100644 --- a/userland/testbin/badcall/bad_ftruncate.c +++ b/userland/testbin/badcall/bad_ftruncate.c @@ -105,5 +105,6 @@ test_ftruncate(void) result = ftruncate_size_neg(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-ftruncate", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_getcwd.c b/userland/testbin/badcall/bad_getcwd.c index d6a2303..4dacfa1 100644 --- a/userland/testbin/badcall/bad_getcwd.c +++ b/userland/testbin/badcall/bad_getcwd.c @@ -39,5 +39,6 @@ test_getcwd(void) int ntests = 0, lost_points = 0; test_getcwd_buf(&ntests, &lost_points); - partial_credit(SECRET, "/testbin/badcall-getcwd", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_getdirentry.c b/userland/testbin/badcall/bad_getdirentry.c index 34d39e8..5d8f425 100644 --- a/userland/testbin/badcall/bad_getdirentry.c +++ b/userland/testbin/badcall/bad_getdirentry.c @@ -41,5 +41,6 @@ test_getdirentry(void) test_getdirentry_fd(&ntests, &lost_points); test_getdirentry_buf(&ntests, &lost_points); - partial_credit(SECRET, "/testbin/badcall-getdirentry", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_ioctl.c b/userland/testbin/badcall/bad_ioctl.c index a536429..f61add5 100644 --- a/userland/testbin/badcall/bad_ioctl.c +++ b/userland/testbin/badcall/bad_ioctl.c @@ -116,5 +116,6 @@ test_ioctl(void) result = ioctl_badbuf(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-ioctl", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_link.c b/userland/testbin/badcall/bad_link.c index 80102f8..82e0314 100644 --- a/userland/testbin/badcall/bad_link.c +++ b/userland/testbin/badcall/bad_link.c @@ -101,5 +101,6 @@ test_link(void) result = link_empty2(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-link", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_lseek.c b/userland/testbin/badcall/bad_lseek.c index 11a757b..b2b968c 100644 --- a/userland/testbin/badcall/bad_lseek.c +++ b/userland/testbin/badcall/bad_lseek.c @@ -303,5 +303,6 @@ test_lseek(void) result = lseek_whence_inval(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-lseek", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_mkdir.c b/userland/testbin/badcall/bad_mkdir.c index 7ab7edd..5b79042 100644 --- a/userland/testbin/badcall/bad_mkdir.c +++ b/userland/testbin/badcall/bad_mkdir.c @@ -96,5 +96,6 @@ test_mkdir(void) mkdir_empty(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-mkdir", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_open.c b/userland/testbin/badcall/bad_open.c index 194725c..be3d508 100644 --- a/userland/testbin/badcall/bad_open.c +++ b/userland/testbin/badcall/bad_open.c @@ -86,5 +86,6 @@ test_open(void) result = open_empty(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-open", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_pipe.c b/userland/testbin/badcall/bad_pipe.c index c581302..27f3f68 100644 --- a/userland/testbin/badcall/bad_pipe.c +++ b/userland/testbin/badcall/bad_pipe.c @@ -94,5 +94,6 @@ test_pipe(void) result = pipe_unaligned(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-pipe", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_read.c b/userland/testbin/badcall/bad_read.c index d0c529a..3fdccf1 100644 --- a/userland/testbin/badcall/bad_read.c +++ b/userland/testbin/badcall/bad_read.c @@ -41,7 +41,8 @@ test_read(void) test_read_fd(&ntests, &lost_points); test_read_buf(&ntests, &lost_points); - partial_credit(SECRET, "/testbin/badcall-read", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_readlink.c b/userland/testbin/badcall/bad_readlink.c index 53ff792..8682373 100644 --- a/userland/testbin/badcall/bad_readlink.c +++ b/userland/testbin/badcall/bad_readlink.c @@ -102,6 +102,7 @@ test_readlink(void) result = readlink_empty(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-readlink", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_reboot.c b/userland/testbin/badcall/bad_reboot.c index 68e7c1b..7318e45 100644 --- a/userland/testbin/badcall/bad_reboot.c +++ b/userland/testbin/badcall/bad_reboot.c @@ -65,5 +65,6 @@ test_reboot(void) result = reboot_badflags(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-reboot", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_remove.c b/userland/testbin/badcall/bad_remove.c index 002866c..d971045 100644 --- a/userland/testbin/badcall/bad_remove.c +++ b/userland/testbin/badcall/bad_remove.c @@ -121,5 +121,6 @@ test_remove(void) result = remove_empty(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-remove", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_rename.c b/userland/testbin/badcall/bad_rename.c index ebdba0f..355f983 100644 --- a/userland/testbin/badcall/bad_rename.c +++ b/userland/testbin/badcall/bad_rename.c @@ -130,6 +130,7 @@ test_rename(void) result = rename_empty2(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-rename", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_rmdir.c b/userland/testbin/badcall/bad_rmdir.c index a72c685..98e0080 100644 --- a/userland/testbin/badcall/bad_rmdir.c +++ b/userland/testbin/badcall/bad_rmdir.c @@ -121,5 +121,6 @@ test_rmdir(void) result = rmdir_empty(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-rmdir", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_sbrk.c b/userland/testbin/badcall/bad_sbrk.c index 59aa314..8849db8 100644 --- a/userland/testbin/badcall/bad_sbrk.c +++ b/userland/testbin/badcall/bad_sbrk.c @@ -139,6 +139,7 @@ test_sbrk(void) result = sbrk_unalignedneg(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-sbrk", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_stat.c b/userland/testbin/badcall/bad_stat.c index 71c00c8..871d586 100644 --- a/userland/testbin/badcall/bad_stat.c +++ b/userland/testbin/badcall/bad_stat.c @@ -117,7 +117,8 @@ test_fstat(void) result = any_badbuf(badbuf_fstat, "fstat"); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-fstat", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } void @@ -136,7 +137,8 @@ test_lstat(void) result = any_badbuf(badbuf_lstat, "lstat"); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-lstat", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } void @@ -155,6 +157,7 @@ test_stat(void) result = any_badbuf(badbuf_stat, "stat"); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-stat", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_symlink.c b/userland/testbin/badcall/bad_symlink.c index 9d12507..74c0526 100644 --- a/userland/testbin/badcall/bad_symlink.c +++ b/userland/testbin/badcall/bad_symlink.c @@ -78,5 +78,6 @@ test_symlink(void) result = symlink_empty2(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-symlink", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_time.c b/userland/testbin/badcall/bad_time.c index 7303c12..4474c9e 100644 --- a/userland/testbin/badcall/bad_time.c +++ b/userland/testbin/badcall/bad_time.c @@ -87,5 +87,6 @@ test_time(void) result = time_badnsecs(KERN_PTR, "__time with kernel nsecs pointer"); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-time", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_waitpid.c b/userland/testbin/badcall/bad_waitpid.c index 55d6c04..09fe88a 100644 --- a/userland/testbin/badcall/bad_waitpid.c +++ b/userland/testbin/badcall/bad_waitpid.c @@ -476,5 +476,6 @@ test_waitpid(void) result = wait_siblings(); handle_result(result, &lost_points); - partial_credit(SECRET, "/testbin/badcall-waitpid", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); } diff --git a/userland/testbin/badcall/bad_write.c b/userland/testbin/badcall/bad_write.c index 6e9d100..77a1ea3 100644 --- a/userland/testbin/badcall/bad_write.c +++ b/userland/testbin/badcall/bad_write.c @@ -41,5 +41,6 @@ test_write(void) test_write_fd(&ntests, &lost_points); test_write_buf(&ntests, &lost_points); - partial_credit(SECRET, "/testbin/badcall-write", ntests - lost_points, ntests); + if(!lost_points) + success(TEST161_SUCCESS, SECRET, "/testbin/badcall"); }