From: Nicholas Nethercote Date: Sun, 14 Nov 2004 15:56:32 +0000 (+0000) Subject: Add gettimeofday() to test. X-Git-Tag: svn/VALGRIND_3_0_0~1322 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=344a3d78aa18bf37da39ce4becbbda0e18aa0f85;p=thirdparty%2Fvalgrind.git Add gettimeofday() to test. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2990 --- diff --git a/memcheck/tests/scalar.c b/memcheck/tests/scalar.c index b5e04582ef..3649522d0b 100644 --- a/memcheck/tests/scalar.c +++ b/memcheck/tests/scalar.c @@ -315,9 +315,8 @@ int main(void) //SY(__NR_getrusage); // __NR_gettimeofday 78 --> sys_gettimeofday() - // XXX: it succeeds when I give it two NULL pointers... kernel bug? -// GO(__NR_gettimeofday, "2s 2m"); -// SY(__NR_gettimeofday, x0, x0); + GO(__NR_gettimeofday, "2s 2m"); + SY(__NR_gettimeofday, x0, x0+1); // __NR_settimeofday 79 --> sys_settimeofday() GO(__NR_settimeofday, "2s 2m"); diff --git a/memcheck/tests/scalar.stderr.exp b/memcheck/tests/scalar.stderr.exp index ae3d491db8..48848f6d74 100644 --- a/memcheck/tests/scalar.stderr.exp +++ b/memcheck/tests/scalar.stderr.exp @@ -846,6 +846,31 @@ Syscall param old_getrlimit(rlim) points to unaddressable byte(s) by 0x........: __libc_start_main (...libc...) by 0x........: ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 78: __NR_gettimeofday 2s 2m +----------------------------------------------------- + +Syscall param gettimeofday(tv) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param gettimeofday(tz) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param gettimeofday(tv) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param gettimeofday(tz) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- 79: __NR_settimeofday 2s 2m -----------------------------------------------------