FreeBSD Bugzilla – Attachment 149687 Details for
Bug 194828
[test] lib.libc.sys.getcontext_test.setcontext_link fails on amd64, not i386
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
only_use_6_args_on_amd64.patch
file_194828.txt (text/plain), 1.63 KB, created by
John Baldwin
on 2014-11-21 20:24:17 UTC
(
hide
)
Description:
only_use_6_args_on_amd64.patch
Filename:
MIME Type:
Creator:
John Baldwin
Created:
2014-11-21 20:24:17 UTC
Size:
1.63 KB
patch
obsolete
>diff --git a/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c b/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c >index ed43df5..46c0ff1 100644 >--- a/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c >+++ b/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c >@@ -51,7 +51,11 @@ run(int n, ...) > ATF_REQUIRE_EQ(n, DEPTH - calls - 1); > > va_start(va, n); >+#if defined(__FreeBSD__) && defined(__amd64__) >+ for (i = 0; i < 5; i++) { >+#else > for (i = 0; i < 9; i++) { >+#endif > ia = va_arg(va, int); > ATF_REQUIRE_EQ(i, ia); > } >@@ -101,13 +105,6 @@ 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); > >@@ -115,21 +112,20 @@ ATF_TC_BODY(setcontext_link, tc) > uc[i].uc_stack.ss_size = STACKSZ; > uc[i].uc_link = (i > 0) ? &uc[i - 1] : &save; > >+#if defined(__FreeBSD__) && defined(__amd64__) >+ /* FreeBSD/amd64 only permits up to 6 arguments. */ >+ makecontext(&uc[i], (void *)run, 6, i, >+ 0, 1, 2, 3, 4); >+#else > makecontext(&uc[i], (void *)run, 10, i, > 0, 1, 2, 3, 4, 5, 6, 7, 8); >+#endif > } > > 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)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194828
:
149293
| 149687