Date: Wed, 16 Jul 2003 04:22:03 -0400 (EDT) From: Daniel Eischen <eischen@vigrid.com> To: David Schultz <das@freebsd.org> Cc: freebsd-threads@freebsd.org Subject: Re: Threads regression tests (was: Re: ACE Proactor and libkse) Message-ID: <Pine.GSO.4.10.10307160407570.12570-100000@pcnet5.pcnet.com> In-Reply-To: <20030716055247.GA39968@HAL9000.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 15 Jul 2003, David Schultz wrote: > On Wed, Jul 16, 2003, David Xu wrote: > > Can you test my libkse patch ? > > http://people.freebsd.org/~davidxu/libpthread_bound.diffs > > If you can test the patch to make sure I don't break signal > > code, then I will commit this patch. > > Is there interest in incrementally building a threads-related > regression test suite in src/tools/regression? This would mean > less breakage for people who are trying to use KSE/libthr, and an > easy way for threads developers to be somewhat confident that > their changes are correct. For example, two weeks ago I was > tearing my hair out over a sigwait() problem that caused the > following program to deadlock. Since I already bothered to > isolate the bug, why not do the last 1% of the work and check in a > test so that it never comes back? Thoughts? That's why lib{c_r|pthread|thr}/test/ exists. > #include <err.h> > #include <signal.h> > #include <stdlib.h> > > int main() { > > sigset_t mask; > int sig; > > sigemptyset(&mask); > sigaddset(&mask, SIGALRM); > if (sigprocmask(SIG_BLOCK, &mask, NULL) < 0) > err(1, "sigprocmask"); > > if (raise(SIGALRM) < 0) > err(1, "raise"); > > if (sigwait(&mask, &sig) < 0) > err(1, "sigwait"); > > return (0); > } This seems to be kernel bug (if it is a bug). If you build it without linking any of the threads libraries it still exits the program without sigwait receiving the signal. -- Dan Eischen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10307160407570.12570-100000>