Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/tests/lib/libpthread Pull up following revision(s) (reque...
details: https://anonhg.NetBSD.org/src/rev/8fd8819cf2e9
branches: netbsd-7
changeset: 798307:8fd8819cf2e9
user: martin <martin%NetBSD.org@localhost>
date: Fri Aug 29 11:44:46 2014 +0000
description:
Pull up following revision(s) (requested by bouyer in ticket #63):
tests/lib/libpthread/t_swapcontext.c: revision 1.2
Go back to the initial context (as tests/lib/libc/sys/t_swapcontext.c does)
after checking pthread_self() didn't change. Otherwise the process exits
outside of atf context.
Should fix "Test case exited normally but failed to create the results file: Results file is empty" reports from atf-run.
diffstat:
tests/lib/libpthread/t_swapcontext.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r dea643267138 -r 8fd8819cf2e9 tests/lib/libpthread/t_swapcontext.c
--- a/tests/lib/libpthread/t_swapcontext.c Fri Aug 29 11:42:15 2014 +0000
+++ b/tests/lib/libpthread/t_swapcontext.c Fri Aug 29 11:44:46 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_swapcontext.c,v 1.1 2012/09/12 02:00:55 manu Exp $ */
+/* $NetBSD: t_swapcontext.c,v 1.1.12.1 2014/08/29 11:44:46 martin Exp $ */
/*
* Copyright (c) 2012 Emmanuel Dreyfus. All rights reserved.
@@ -59,6 +59,8 @@
ATF_REQUIRE_EQ(oself, nself);
printf("Test succeeded\n");
+ /* Go back in main */
+ ATF_REQUIRE(swapcontext(&nctx, &octx));
/* NOTREACHED */
return;
@@ -99,8 +101,7 @@
PTHREAD_REQUIRE(getcontext(&nctx));
PTHREAD_REQUIRE(pthread_create(&thread, NULL, threadfunc, NULL));
-
- return;
+ PTHREAD_REQUIRE(pthread_join(thread, NULL));
}
ATF_TP_ADD_TCS(tp)
Home |
Main Index |
Thread Index |
Old Index