bad_time - int rv; rv = __time(NULL, ptr); report_test(rv,...

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, &quot;__time with invalid seconds pointer&quot;); time_badsecs(KERN_PTR, &quot;__time with kernel seconds pointer&quot;); time_badnsecs(INVAL_PTR, &quot;__time with invalid nsecs pointer&quot;); time_badnsecs(KERN_PTR, &quot;__time with kernel nsecs pointer&quot;); }...
View Full Document

This note was uploaded on 11/10/2009 for the course CS 536 taught by Professor Lums during the Spring '09 term at Indiana.

Ask a homework question - tutors are online