diff options
author | John Baldwin <jhb@FreeBSD.org> | 2015-09-09 21:18:10 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2015-09-09 21:18:10 +0000 |
commit | 479b610db509230ce4091444a3e767a3834c2be2 (patch) | |
tree | 198f9b84d46515293c70185c0e80a7c04f235356 /tests | |
parent | 9e18c9eb27cd81ed9e603105af1bebd0874230f7 (diff) | |
download | src-479b610db509230ce4091444a3e767a3834c2be2.tar.gz src-479b610db509230ce4091444a3e767a3834c2be2.zip |
Properly size the children[] arrays in the follow fork tests.
Notes
Notes:
svn path=/head/; revision=287600
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sys/kern/ptrace_test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index c10c097b37b6..538837458e38 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -493,7 +493,7 @@ handle_fork_events(pid_t parent) ATF_TC_WITHOUT_HEAD(ptrace__follow_fork_both_attached); ATF_TC_BODY(ptrace__follow_fork_both_attached, tc) { - pid_t children[0], fpid, wpid; + pid_t children[2], fpid, wpid; int status; ATF_REQUIRE((fpid = fork()) != -1); @@ -549,7 +549,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_attached, tc) ATF_TC_WITHOUT_HEAD(ptrace__follow_fork_child_detached); ATF_TC_BODY(ptrace__follow_fork_child_detached, tc) { - pid_t children[0], fpid, wpid; + pid_t children[2], fpid, wpid; int status; ATF_REQUIRE((fpid = fork()) != -1); @@ -600,7 +600,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_detached, tc) ATF_TC_WITHOUT_HEAD(ptrace__follow_fork_parent_detached); ATF_TC_BODY(ptrace__follow_fork_parent_detached, tc) { - pid_t children[0], fpid, wpid; + pid_t children[2], fpid, wpid; int status; ATF_REQUIRE((fpid = fork()) != -1); @@ -681,7 +681,7 @@ attach_fork_parent(int cpipe[2]) ATF_TC_WITHOUT_HEAD(ptrace__follow_fork_both_attached_unrelated_debugger); ATF_TC_BODY(ptrace__follow_fork_both_attached_unrelated_debugger, tc) { - pid_t children[0], fpid, wpid; + pid_t children[2], fpid, wpid; int cpipe[2], status; ATF_REQUIRE(pipe(cpipe) == 0); @@ -749,7 +749,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_attached_unrelated_debugger, tc) ATF_TC_WITHOUT_HEAD(ptrace__follow_fork_child_detached_unrelated_debugger); ATF_TC_BODY(ptrace__follow_fork_child_detached_unrelated_debugger, tc) { - pid_t children[0], fpid, wpid; + pid_t children[2], fpid, wpid; int cpipe[2], status; ATF_REQUIRE(pipe(cpipe) == 0); @@ -812,7 +812,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_detached_unrelated_debugger, tc) ATF_TC_WITHOUT_HEAD(ptrace__follow_fork_parent_detached_unrelated_debugger); ATF_TC_BODY(ptrace__follow_fork_parent_detached_unrelated_debugger, tc) { - pid_t children[0], fpid, wpid; + pid_t children[2], fpid, wpid; int cpipe[2], status; ATF_REQUIRE(pipe(cpipe) == 0); |