Converted vfork() and acct().  Properly annotated all the ones we don't handle,
plus a few we do.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2967 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/memcheck/tests/.cvsignore b/memcheck/tests/.cvsignore
index c2af08f..abd462a 100644
--- a/memcheck/tests/.cvsignore
+++ b/memcheck/tests/.cvsignore
@@ -51,6 +51,7 @@
 scalar
 scalar_fork
 scalar_supp
+scalar_vfork
 sigaltstack
 signal2
 str_tester
diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am
index 81bce31..2d7bdf4 100644
--- a/memcheck/tests/Makefile.am
+++ b/memcheck/tests/Makefile.am
@@ -56,6 +56,7 @@
 	scalar.stderr.exp scalar.vgtest scalar.supp \
 	scalar_fork.stderr.exp scalar_fork.vgtest \
 	scalar_supp.stderr.exp scalar_supp.vgtest \
+	scalar_vfork.stderr.exp scalar_vfork.vgtest \
 	sigaltstack.stderr.exp sigaltstack.vgtest \
 	signal2.stderr.exp \
 	signal2.stdout.exp signal2.vgtest \
@@ -85,7 +86,7 @@
 	nanoleak new_nothrow \
 	null_socket overlap \
 	realloc1 realloc2 realloc3 scalar scalar_fork \
-	scalar_supp sigaltstack signal2 \
+	scalar_supp scalar_vfork sigaltstack signal2 \
 	str_tester supp1 supp2 suppfree \
 	trivialleak weirdioctl	\
 	mismatches new_override metadata threadederrno \
@@ -140,6 +141,7 @@
 scalar_SOURCES 		= scalar.c
 scalar_fork_SOURCES 	= scalar_fork.c
 scalar_supp_SOURCES 	= scalar_supp.c
+scalar_vfork_SOURCES 	= scalar_vfork.c
 signal2_SOURCES 	= signal2.c
 supp1_SOURCES 		= supp.c
 supp2_SOURCES 		= supp.c
diff --git a/memcheck/tests/scalar.c b/memcheck/tests/scalar.c
index afc27dc..0c7d881 100644
--- a/memcheck/tests/scalar.c
+++ b/memcheck/tests/scalar.c
@@ -162,9 +162,11 @@
    GO(__NR_getegid, "0e");
    SY(__NR_getegid);
 
-   // __NR_acct 51
+   // __NR_acct 51 --> sys_acct()
+   GO(__NR_acct, "1s 1m");
+   SY(__NR_acct, s0);
 
-   // __NR_umount2 52
+   // __NR_umount2 52 --> sys_umount()
    GO(__NR_umount2, "2s 1m");
    SY(__NR_umount2, s0, i0);
 
diff --git a/memcheck/tests/scalar.stderr.exp b/memcheck/tests/scalar.stderr.exp
index 4ed7ef2..48a0db3 100644
--- a/memcheck/tests/scalar.stderr.exp
+++ b/memcheck/tests/scalar.stderr.exp
@@ -362,6 +362,20 @@
  50:        __NR_getegid 0e
 -----------------------------------------------------
 -----------------------------------------------------
+ 51:           __NR_acct 1s 1m
+-----------------------------------------------------
+
+Syscall param acct(filename) contains uninitialised byte(s)
+   at 0x........: syscall (in /...libc...)
+   by 0x........: __libc_start_main (...libc...)
+   by 0x........: ...
+
+Syscall param acct(filename) 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
+-----------------------------------------------------
  52:        __NR_umount2 2s 1m
 -----------------------------------------------------
 
diff --git a/memcheck/tests/scalar_vfork.c b/memcheck/tests/scalar_vfork.c
new file mode 100644
index 0000000..2158e58
--- /dev/null
+++ b/memcheck/tests/scalar_vfork.c
@@ -0,0 +1,13 @@
+#include "scalar.h"
+
+int main(void)
+{
+   // All __NR_xxx numbers are taken from x86
+   
+   // __NR_vfork 190 --> arch/sys_fork()  [we can't use sys_vfork()]
+   GO(__NR_vfork, "0e");
+   SY(__NR_vfork);
+
+   return(0);
+}
+
diff --git a/memcheck/tests/scalar_vfork.stderr.exp b/memcheck/tests/scalar_vfork.stderr.exp
new file mode 100644
index 0000000..1849c77
--- /dev/null
+++ b/memcheck/tests/scalar_vfork.stderr.exp
@@ -0,0 +1,3 @@
+-----------------------------------------------------
+190:          __NR_vfork 0e
+-----------------------------------------------------
diff --git a/memcheck/tests/scalar_vfork.vgtest b/memcheck/tests/scalar_vfork.vgtest
new file mode 100644
index 0000000..3ddad70
--- /dev/null
+++ b/memcheck/tests/scalar_vfork.vgtest
@@ -0,0 +1,2 @@
+prog: scalar_vfork
+vgopts: -q