diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2014-11-05 16:38:57 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2014-11-05 16:38:57 +0000 |
commit | 0369b14474ed7cd0a0bdd2af4157927126a03713 (patch) | |
tree | a36d4396e873d2ac244587f83632a2e88938bf8e /contrib | |
parent | 5ff32a6885ff2073976f5c3c2f36bf228cf8682a (diff) | |
download | src-0369b14474ed7cd0a0bdd2af4157927126a03713.tar.gz src-0369b14474ed7cd0a0bdd2af4157927126a03713.zip |
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
Notes
Notes:
svn path=/head/; revision=274143
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/sys/t_getcontext.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c b/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c index 3a2d9f73f5d1..ed43df57eb04 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c @@ -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) |