{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

bad_time - int rv rv =_time(NULL ptr report_test(rv errno...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * __time */ #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <err.h> #include "config.h" #include "test.h" static void time_badsecs(void *ptr, const char *desc) { int rv; rv = __time(ptr, NULL); report_test(rv, errno, EFAULT, desc); } static void time_badnsecs(void *ptr, const char *desc) {
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int rv; rv = __time(NULL, ptr); report_test(rv, errno, EFAULT, desc); } void test_time(void) { time_badsecs(INVAL_PTR, "__time with invalid seconds pointer"); time_badsecs(KERN_PTR, "__time with kernel seconds pointer"); time_badnsecs(INVAL_PTR, "__time with invalid nsecs pointer"); time_badnsecs(KERN_PTR, "__time with kernel nsecs pointer"); }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online