Source-Changes-HG archive

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

[src/trunk]: src/tests/kernel Set timeout expected in resume1 (t_ptrace_wait*)



details:   https://anonhg.NetBSD.org/src/rev/92e85e07c198
branches:  trunk
changeset: 822611:92e85e07c198
user:      kamil <kamil%NetBSD.org@localhost>
date:      Tue Mar 28 03:19:20 2017 +0000

description:
Set timeout expected in resume1 (t_ptrace_wait*)

Mark timeout for this test 5 sec. It sometimes works sometimes does not.

Add a local sleep(3) at the end to get consisten report about timeouting
always.

PR kern/51995

Sponsored by <The NetBSD Foundation>

diffstat:

 tests/kernel/t_ptrace_wait.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r 955a0a956fd8 -r 92e85e07c198 tests/kernel/t_ptrace_wait.c
--- a/tests/kernel/t_ptrace_wait.c      Tue Mar 28 03:03:15 2017 +0000
+++ b/tests/kernel/t_ptrace_wait.c      Tue Mar 28 03:19:20 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.c,v 1.81 2017/03/28 03:03:15 kamil Exp $ */
+/*     $NetBSD: t_ptrace_wait.c,v 1.82 2017/03/28 03:19:20 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.81 2017/03/28 03:03:15 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.82 2017/03/28 03:19:20 kamil Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -7287,6 +7287,7 @@
 ATF_TC(resume1);
 ATF_TC_HEAD(resume1, tc)
 {
+       atf_tc_set_md_var(tc, "timeout", "5");
        atf_tc_set_md_var(tc, "descr",
            "Verify that a thread can be suspended by a debugger and later "
            "resumed by the debugger");
@@ -7309,7 +7310,7 @@
        struct ptrace_lwpinfo pl;
        struct ptrace_siginfo psi;
 
-       atf_tc_expect_fail("PR kern/51995");
+       atf_tc_expect_timeout("PR kern/51995");
 
        ATF_REQUIRE(msg_open(&fds) == 0);
 
@@ -7413,6 +7414,9 @@
        TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
 
        msg_close(&fds);
+
+       printf("XXX: Test worked this time but for consistency timeout it\n");
+       sleep(10);
 }
 
 ATF_TC(syscall1);



Home | Main Index | Thread Index | Old Index