|
From: Nicholas N. <nj...@ca...> - 2004-11-16 17:59:06
|
CVS commit by nethercote:
Add some missing test cases.
M +21 -21 scalar.c 1.49
M +54 -2 scalar.stderr.exp 1.41
--- valgrind/memcheck/tests/scalar.c #1.48:1.49
@@ -28,9 +28,9 @@ int main(void)
// __NR_exit 1
- GO(__NR_exit, "other");
+ GO(__NR_exit, "below");
// (see below)
// __NR_fork 2
- GO(__NR_fork, "0s 0m");
+ GO(__NR_fork, "other");
// (sse scalar_fork.c)
@@ -149,5 +149,6 @@ int main(void)
// __NR_pause 29
- // XXX: will have to be tested separately
+ GO(__NR_pause, "ignore");
+ // (hard to test, and no args so not much to be gained -- don't bother)
// __NR_utime 30
@@ -322,6 +323,6 @@ int main(void)
// __NR_sigsuspend 72
// XXX: how do you use this function?
-// GO(__NR_sigsuspend, ".s .m");
-// SY(__NR_sigsuspend); FAIL;
+ GO(__NR_sigsuspend, "ignore");
+ // (I don't know how to test this...)
// __NR_sigpending 73
@@ -448,7 +449,6 @@ int main(void)
// __NR_socketcall 102
- // XXX: need to do properly
-// GO(__NR_socketcall, "2s 1m");
-// SY(__NR_socketcall, x0+SYS_SOCKETPAIR, x0); FAIL;
+ GO(__NR_socketcall, "XXX");
+ // (XXX: need to do all sub-cases properly)
// __NR_syslog 103
@@ -509,5 +509,5 @@ int main(void)
// __NR_ipc 117
- // XXX: This is simplistic -- doesn't treat any of the sub-ops.
+ // XXX: This is simplistic -- need to do all the sub-cases properly.
// XXX: Also, should be 6 scalar errors, except glibc's syscall() doesn't
// use the 6th one!
@@ -521,6 +521,6 @@ int main(void)
// __NR_sigreturn 119
- //GO(__NR_sigreturn, ".s .m");
- //SY(__NR_sigreturn); FAIL;
+ GO(__NR_sigreturn, "n/a");
+ //SY(__NR_sigreturn); // (Not yet handled by Valgrind) FAIL;
// __NR_clone 120
@@ -550,6 +550,6 @@ int main(void)
// __NR_adjtimex 124
- // XXX: need to do properly, but deref'ing NULL...
-// GO(__NR_adjtimex, "1s 1m");
+ // XXX: need to do properly, but deref'ing NULL causing Valgrind to crash...
+ GO(__NR_adjtimex, "XXX");
// SY(__NR_adjtimex, x0); FAIL;
@@ -595,6 +595,6 @@ int main(void)
// __NR_sysfs 135
- //GO(__NR_sysfs, ".s .m");
- //SY(__NR_sysfs); FAIL;
+ GO(__NR_sysfs, "n/a");
+ //SY(__NR_sysfs); // (Not yet handled by Valgrind) FAIL;
// __NR_personality 136
@@ -687,6 +687,6 @@ int main(void)
// __NR_sched_yield 158
- //GO(__NR_sched_yield, ".s .m");
- //SY(__NR_sched_yield); FAIL;
+ GO(__NR_sched_yield, "0s 0m");
+ SY(__NR_sched_yield); SUCC;
// __NR_sched_get_priority_max 159
@@ -707,6 +707,6 @@ int main(void)
// __NR_mremap 163
- //GO(__NR_mremap, ".s .m");
- //SY(__NR_mremap); FAIL;
+ GO(__NR_mremap, "5s 0m");
+ SY(__NR_mremap, x0+1, x0, x0, x0, x0); FAILx(EINVAL);
// __NR_setresuid 164
@@ -771,6 +771,6 @@ int main(void)
// __NR_rt_sigsuspend 179
- //GO(__NR_rt_sigsuspend, ".s .m");
- //SY(__NR_rt_sigsuspend); FAIL;
+ GO(__NR_rt_sigsuspend, "ignore");
+ // (I don't know how to test this...)
// __NR_pread64 180
--- valgrind/memcheck/tests/scalar.stderr.exp #1.40:1.41
@@ -1,7 +1,7 @@
-----------------------------------------------------
- 1: __NR_exit other
+ 1: __NR_exit below
-----------------------------------------------------
-----------------------------------------------------
- 2: __NR_fork 0s 0m
+ 2: __NR_fork other
-----------------------------------------------------
-----------------------------------------------------
@@ -418,4 +418,7 @@
-----------------------------------------------------
-----------------------------------------------------
+ 29: __NR_pause ignore
+-----------------------------------------------------
+-----------------------------------------------------
30: __NR_utime 2s 2m
-----------------------------------------------------
@@ -829,4 +832,7 @@
by 0x........: ...
-----------------------------------------------------
+ 72: __NR_sigsuspend ignore
+-----------------------------------------------------
+-----------------------------------------------------
73: __NR_sigpending 1s 1m
-----------------------------------------------------
@@ -1273,4 +1279,7 @@
by 0x........: ...
-----------------------------------------------------
+102: __NR_socketcall XXX
+-----------------------------------------------------
+-----------------------------------------------------
103: __NR_syslog 3s 1m
-----------------------------------------------------
@@ -1523,4 +1532,7 @@
by 0x........: ...
-----------------------------------------------------
+119: __NR_sigreturn n/a
+-----------------------------------------------------
+-----------------------------------------------------
120: __NR_clone 4s 0m
-----------------------------------------------------
@@ -1587,4 +1599,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+124: __NR_adjtimex XXX
+-----------------------------------------------------
+-----------------------------------------------------
125: __NR_mprotect 3s 0m
-----------------------------------------------------
@@ -1726,4 +1741,7 @@
-----------------------------------------------------
-----------------------------------------------------
+135: __NR_sysfs n/a
+-----------------------------------------------------
+-----------------------------------------------------
136: __NR_personality 1s 0m
-----------------------------------------------------
@@ -2085,4 +2103,7 @@
by 0x........: ...
-----------------------------------------------------
+158: __NR_sched_yield 0s 0m
+-----------------------------------------------------
+-----------------------------------------------------
159:__NR_sched_get_priority_max 1s 0m
-----------------------------------------------------
@@ -2129,4 +2150,32 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+163: __NR_mremap 5s 0m
+-----------------------------------------------------
+
+Syscall param mremap(old_addr) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mremap(old_size) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mremap(new_size) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mremap(flags) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+
+Syscall param mremap(new_addr) contains uninitialised byte(s)
+ at 0x........: syscall (in /...libc...)
+ by 0x........: __libc_start_main (...libc...)
+ by 0x........: ...
+-----------------------------------------------------
164: __NR_setresuid 3s 0m
-----------------------------------------------------
@@ -2455,4 +2504,7 @@
Address 0x........ is not stack'd, malloc'd or (recently) free'd
-----------------------------------------------------
+179: __NR_rt_sigsuspend ignore
+-----------------------------------------------------
+-----------------------------------------------------
180: __NR_pread64 5s 1m
-----------------------------------------------------
|