Updated badcall tests to just print success

This commit is contained in:
Guru Prasad Srinivasa 2016-03-01 17:47:52 -05:00
parent e29fa85a7d
commit 0cd341c248
26 changed files with 56 additions and 28 deletions

View File

@ -62,6 +62,7 @@ test_chdir(void)
result = chdir_empty(); result = chdir_empty();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-chdir", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -39,5 +39,6 @@ test_close(void)
int ntests = 0, lost_points = 0; int ntests = 0, lost_points = 0;
test_close_fd(&ntests, &lost_points); 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");
} }

View File

@ -157,5 +157,6 @@ test_dup2(void)
failure = dup2_self(); failure = dup2_self();
handle_result(failure, &lost_points); handle_result(failure, &lost_points);
partial_credit(SECRET, "/testbin/badcall-dup2", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -217,5 +217,6 @@ test_execv(void)
result = exec_onearg(KERN_PTR, "exec with kernel pointer arg"); result = exec_onearg(KERN_PTR, "exec with kernel pointer arg");
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-execv", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -40,6 +40,7 @@ test_fsync(void)
test_fsync_fd(&ntests, &lost_points); 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");
} }

View File

@ -105,5 +105,6 @@ test_ftruncate(void)
result = ftruncate_size_neg(); result = ftruncate_size_neg();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-ftruncate", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -39,5 +39,6 @@ test_getcwd(void)
int ntests = 0, lost_points = 0; int ntests = 0, lost_points = 0;
test_getcwd_buf(&ntests, &lost_points); 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");
} }

View File

@ -41,5 +41,6 @@ test_getdirentry(void)
test_getdirentry_fd(&ntests, &lost_points); test_getdirentry_fd(&ntests, &lost_points);
test_getdirentry_buf(&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");
} }

View File

@ -116,5 +116,6 @@ test_ioctl(void)
result = ioctl_badbuf(); result = ioctl_badbuf();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-ioctl", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -101,5 +101,6 @@ test_link(void)
result = link_empty2(); result = link_empty2();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-link", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -303,5 +303,6 @@ test_lseek(void)
result = lseek_whence_inval(); result = lseek_whence_inval();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-lseek", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -96,5 +96,6 @@ test_mkdir(void)
mkdir_empty(); mkdir_empty();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-mkdir", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -86,5 +86,6 @@ test_open(void)
result = open_empty(); result = open_empty();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-open", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -94,5 +94,6 @@ test_pipe(void)
result = pipe_unaligned(); result = pipe_unaligned();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-pipe", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -41,7 +41,8 @@ test_read(void)
test_read_fd(&ntests, &lost_points); test_read_fd(&ntests, &lost_points);
test_read_buf(&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");
} }

View File

@ -102,6 +102,7 @@ test_readlink(void)
result = readlink_empty(); result = readlink_empty();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-readlink", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -65,5 +65,6 @@ test_reboot(void)
result = reboot_badflags(); result = reboot_badflags();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-reboot", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -121,5 +121,6 @@ test_remove(void)
result = remove_empty(); result = remove_empty();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-remove", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -130,6 +130,7 @@ test_rename(void)
result = rename_empty2(); result = rename_empty2();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-rename", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -121,5 +121,6 @@ test_rmdir(void)
result = rmdir_empty(); result = rmdir_empty();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-rmdir", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -139,6 +139,7 @@ test_sbrk(void)
result = sbrk_unalignedneg(); result = sbrk_unalignedneg();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-sbrk", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -117,7 +117,8 @@ test_fstat(void)
result = any_badbuf(badbuf_fstat, "fstat"); result = any_badbuf(badbuf_fstat, "fstat");
handle_result(result, &lost_points); 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 void
@ -136,7 +137,8 @@ test_lstat(void)
result = any_badbuf(badbuf_lstat, "lstat"); result = any_badbuf(badbuf_lstat, "lstat");
handle_result(result, &lost_points); 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 void
@ -155,6 +157,7 @@ test_stat(void)
result = any_badbuf(badbuf_stat, "stat"); result = any_badbuf(badbuf_stat, "stat");
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-stat", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -78,5 +78,6 @@ test_symlink(void)
result = symlink_empty2(); result = symlink_empty2();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-symlink", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -87,5 +87,6 @@ test_time(void)
result = time_badnsecs(KERN_PTR, "__time with kernel nsecs pointer"); result = time_badnsecs(KERN_PTR, "__time with kernel nsecs pointer");
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-time", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -476,5 +476,6 @@ test_waitpid(void)
result = wait_siblings(); result = wait_siblings();
handle_result(result, &lost_points); handle_result(result, &lost_points);
partial_credit(SECRET, "/testbin/badcall-waitpid", ntests - lost_points, ntests); if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
} }

View File

@ -41,5 +41,6 @@ test_write(void)
test_write_fd(&ntests, &lost_points); test_write_fd(&ntests, &lost_points);
test_write_buf(&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");
} }