Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys Fix ATF ptrace(2) bytes_transfer_piod_rea...



details:   https://anonhg.NetBSD.org/src/rev/e9a1fb7aa268
branches:  trunk
changeset: 322989:e9a1fb7aa268
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sun May 27 08:08:24 2018 +0000

description:
Fix ATF ptrace(2) bytes_transfer_piod_read_auxv test

Make the initial buffer larger to stop triggering the runtime assert about
its size.

Its size is probably larger than all real use cases, but it's good enough
for the purpose of ATF tests and immune of potential AUXV size.

Sponsored by <The NetBSD Foundation>

diffstat:

 tests/lib/libc/sys/t_ptrace_wait.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 80c592c6be00 -r e9a1fb7aa268 tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c        Sun May 27 07:12:26 2018 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c        Sun May 27 08:08:24 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.55 2018/05/27 00:36:56 christos Exp $      */
+/*     $NetBSD: t_ptrace_wait.c,v 1.56 2018/05/27 08:08:24 kamil Exp $ */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.55 2018/05/27 00:36:56 christos Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.56 2018/05/27 08:08:24 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -1734,7 +1734,8 @@
 #if defined(TWAIT_HAVE_STATUS)
        int status;
 #endif
-       AuxInfo ai[64], *aip;
+       /* 512 is more than enough, for the purposes of ATF it's good enough */
+       AuxInfo ai[512], *aip;
 
        ATF_REQUIRE(size < sizeof(ai));
 



Home | Main Index | Thread Index | Old Index