Merging in 2.0.2.

This commit is contained in:
Geoffrey Challen
2017-01-09 22:37:50 -05:00
parent a0406ec181
commit 50cf3276e7
118 changed files with 1350 additions and 3158 deletions

View File

@@ -44,49 +44,33 @@
#include "test.h"
static
int
void
time_badsecs(void *ptr, const char *desc)
{
int rv;
report_begin("%s", desc);
rv = __time(ptr, NULL);
return report_check(rv, errno, EFAULT);
report_check(rv, errno, EFAULT);
}
static
int
void
time_badnsecs(void *ptr, const char *desc)
{
int rv;
report_begin("%s", desc);
rv = __time(NULL, ptr);
return report_check(rv, errno, EFAULT);
report_check(rv, errno, EFAULT);
}
void
test_time(void)
{
int ntests = 0, lost_points = 0;
int result;
time_badsecs(INVAL_PTR, "__time with invalid seconds pointer");
time_badsecs(KERN_PTR, "__time with kernel seconds pointer");
ntests++;
result = time_badsecs(INVAL_PTR, "__time with invalid seconds pointer");
handle_result(result, &lost_points);
ntests++;
result = time_badsecs(KERN_PTR, "__time with kernel seconds pointer");
handle_result(result, &lost_points);
ntests++;
result = time_badnsecs(INVAL_PTR, "__time with invalid nsecs pointer");
handle_result(result, &lost_points);
ntests++;
result = time_badnsecs(KERN_PTR, "__time with kernel nsecs pointer");
handle_result(result, &lost_points);
if(!lost_points)
success(TEST161_SUCCESS, SECRET, "/testbin/badcall");
time_badnsecs(INVAL_PTR, "__time with invalid nsecs pointer");
time_badnsecs(KERN_PTR, "__time with kernel nsecs pointer");
}