From owner-svn-src-all@FreeBSD.ORG Wed Nov 5 16:38:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 045EBFD5; Wed, 5 Nov 2014 16:38:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB4B4614; Wed, 5 Nov 2014 16:38:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sA5Gcv76065194; Wed, 5 Nov 2014 16:38:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sA5Gcv8L065193; Wed, 5 Nov 2014 16:38:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201411051638.sA5Gcv8L065193@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 5 Nov 2014 16:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274143 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2014 16:38:58 -0000 Author: ngie Date: Wed Nov 5 16:38:57 2014 New Revision: 274143 URL: https://svnweb.freebsd.org/changeset/base/274143 Log: Expect lib.libc.sys.getcontext_test.setcontext_link to fail on amd64; add additional debugging to make the underlying problem more visible Calling setcontext(2) on amd64 as shown in the test program is failing on amd64, not i386, with a return code of -1 and an errno of EINVAL Further investigation is being done in the PR to determine the root cause for the failure PR: 194828 Tested with the following configuration: - amd64/i386 - 11.0-CURRENT @ r273153 - 100 times in a tight loop as root with the following commands... -- kyua test lib/libc -- kyua test lib/libc/sys -- kyua test lib/libc/sys/getcontext_test Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Wed Nov 5 16:30:02 2014 (r274142) +++ head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c Wed Nov 5 16:38:57 2014 (r274143) @@ -101,6 +101,13 @@ ATF_TC_BODY(setcontext_link, tc) ucontext_t save; volatile int i = 0; /* avoid longjmp clobbering */ +#ifdef __FreeBSD__ +#ifdef __amd64__ + atf_tc_expect_fail("setcontext in this testcase fails on " + "FreeBSD/amd64 with rc == -1/errno == EINVAL; see PR # 194828"); +#endif +#endif + for (i = 0; i < DEPTH; ++i) { ATF_REQUIRE_EQ(getcontext(&uc[i]), 0); @@ -114,8 +121,15 @@ ATF_TC_BODY(setcontext_link, tc) ATF_REQUIRE_EQ(getcontext(&save), 0); +#ifdef __FreeBSD__ + if (calls == 0) { + int rc = setcontext(&uc[DEPTH-1]); + ATF_REQUIRE_EQ_MSG(rc, 0, "%d != 0; (errno = %d)", rc, errno); + } +#else if (calls == 0) ATF_REQUIRE_EQ(setcontext(&uc[DEPTH-1]), 0); +#endif } ATF_TP_ADD_TCS(tp)