CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: jmmv Date: Thu Apr 5 01:04:18 UTC 2012 Modified Files: src/external/bsd/atf/dist/atf-run: fs.cpp Log Message: Fix retry logic to avoid triggering an assertion. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-run/fs.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/fs.cpp diff -u src/external/bsd/atf/dist/atf-run/fs.cpp:1.3 src/external/bsd/atf/dist/atf-run/fs.cpp:1.4 --- src/external/bsd/atf/dist/atf-run/fs.cpp:1.3 Mon Jan 16 22:41:30 2012 +++ src/external/bsd/atf/dist/atf-run/fs.cpp Thu Apr 5 01:04:18 2012 @@ -137,9 +137,9 @@ retry_chmod: subdirs = d.names(); ok = true; } catch (const atf::system_error e) { +retries--; if (retries == 0) throw e; -retries--; ::sleep(retry_delay_in_seconds); } }
CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: christos Date: Mon Dec 19 21:59:46 UTC 2011 Modified Files: src/external/bsd/atf/dist/atf-run: timer.cpp Log Message: Put back setitimer based code for the have-nots: (OS/X Lion) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-run/timer.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/timer.cpp diff -u src/external/bsd/atf/dist/atf-run/timer.cpp:1.3 src/external/bsd/atf/dist/atf-run/timer.cpp:1.4 --- src/external/bsd/atf/dist/atf-run/timer.cpp:1.3 Sun Dec 18 22:16:05 2011 +++ src/external/bsd/atf/dist/atf-run/timer.cpp Mon Dec 19 16:59:46 2011 @@ -44,11 +44,25 @@ namespace impl = atf::atf_run; // Auxiliary functions. // +#ifdef SIGEV_NONE +#define HAVE_POSIX_TIMER +#endif + +#ifndef HAVE_POSIX_TIMER +static void *handle; +#endif + static void handler(int signo, siginfo_t *si, void *uc) { -impl::timer *timer = static_castimpl::timer *(si-si_value.sival_ptr); +impl::timer *timer = static_castimpl::timer *( +#ifndef HAVE_POSIX_TIMER + handle +#else + si-si_value.sival_ptr +#endif +); timer-setfired(); timer-timeout_callback(); @@ -68,7 +82,7 @@ impl::timer::timer(const unsigned int se throw system_error(IMPL_NAME ::timer::timer, Failed to set signal handler, errno); - +#ifndef HAVE_POSIX_TIMER ::sigevent se; se.sigev_notify = SIGEV_SIGNAL; se.sigev_signo = SIGALRM; @@ -92,11 +106,32 @@ impl::timer::timer(const unsigned int se throw system_error(IMPL_NAME ::timer::timer, Failed to program timer, errno); } +#else +::itimerval it, oit; +it.it_interval.tv_sec = 0; +it.it_interval.tv_usec = 0; +it.it_value.tv_sec = seconds; +it.it_value.tv_usec = 0; +if (::setitimer(ITIMER_REAL, it, oit) == -1) + ::sigaction(SIGALRM, m_old_sa, NULL); +throw system_error(IMPL_NAME ::timer::timer, + Failed to program timer, errno); +} +TIMEVAL_TO_TIMESPEC(m_old_it, oit); +handle = static_castvoid *(this); +#endif } impl::timer::~timer(void) { -int ret = ::timer_delete(m_timer); +int ret; +#ifdef HAVE_POSIX_TIMER +::itimerval oit; +TIMESPEC_TO_TIMEVAL(oit, m_old_it); +ret = ::setitimer(ITIMER_REAL, oit, NULL); +#else +ret = ::timer_delete(m_timer); +#endif INV(ret != -1); ret = ::sigaction(SIGALRM, m_old_sa, NULL); INV(ret != -1);
CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: christos Date: Mon Dec 19 22:25:46 UTC 2011 Modified Files: src/external/bsd/atf/dist/atf-run: timer.cpp Log Message: - make all the ifdefs match - make it compile, and test To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-run/timer.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/timer.cpp diff -u src/external/bsd/atf/dist/atf-run/timer.cpp:1.4 src/external/bsd/atf/dist/atf-run/timer.cpp:1.5 --- src/external/bsd/atf/dist/atf-run/timer.cpp:1.4 Mon Dec 19 16:59:46 2011 +++ src/external/bsd/atf/dist/atf-run/timer.cpp Mon Dec 19 17:25:45 2011 @@ -57,10 +57,10 @@ void handler(int signo, siginfo_t *si, void *uc) { impl::timer *timer = static_castimpl::timer *( -#ifndef HAVE_POSIX_TIMER - handle -#else +#ifdef HAVE_POSIX_TIMER si-si_value.sival_ptr +#else + handle #endif ); @@ -82,7 +82,7 @@ impl::timer::timer(const unsigned int se throw system_error(IMPL_NAME ::timer::timer, Failed to set signal handler, errno); -#ifndef HAVE_POSIX_TIMER +#ifdef HAVE_POSIX_TIMER ::sigevent se; se.sigev_notify = SIGEV_SIGNAL; se.sigev_signo = SIGALRM; @@ -112,12 +112,13 @@ impl::timer::timer(const unsigned int se it.it_interval.tv_usec = 0; it.it_value.tv_sec = seconds; it.it_value.tv_usec = 0; -if (::setitimer(ITIMER_REAL, it, oit) == -1) +if (::setitimer(ITIMER_REAL, it, oit) == -1) { ::sigaction(SIGALRM, m_old_sa, NULL); throw system_error(IMPL_NAME ::timer::timer, Failed to program timer, errno); } -TIMEVAL_TO_TIMESPEC(m_old_it, oit); +TIMEVAL_TO_TIMESPEC(oit.it_interval, m_old_it.it_interval); +TIMEVAL_TO_TIMESPEC(oit.it_value, m_old_it.it_value); handle = static_castvoid *(this); #endif } @@ -126,11 +127,12 @@ impl::timer::~timer(void) { int ret; #ifdef HAVE_POSIX_TIMER +ret = ::timer_delete(m_timer); +#else ::itimerval oit; -TIMESPEC_TO_TIMEVAL(oit, m_old_it); +TIMESPEC_TO_TIMEVAL(oit.it_interval, m_old_it.it_interval); +TIMESPEC_TO_TIMEVAL(oit.it_value, m_old_it.it_value); ret = ::setitimer(ITIMER_REAL, oit, NULL); -#else -ret = ::timer_delete(m_timer); #endif INV(ret != -1); ret = ::sigaction(SIGALRM, m_old_sa, NULL);
CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: christos Date: Sun Dec 18 22:34:06 UTC 2011 Modified Files: src/external/bsd/atf/dist/atf-run: timer.cpp timer.hpp Log Message: Don't use antiquated BSD API's that require global variable, use posix timers instead. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/atf/dist/atf-run/timer.cpp \ src/external/bsd/atf/dist/atf-run/timer.hpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/timer.cpp diff -u src/external/bsd/atf/dist/atf-run/timer.cpp:1.1.1.2 src/external/bsd/atf/dist/atf-run/timer.cpp:1.2 --- src/external/bsd/atf/dist/atf-run/timer.cpp:1.1.1.2 Wed Oct 20 05:14:23 2010 +++ src/external/bsd/atf/dist/atf-run/timer.cpp Sun Dec 18 17:34:06 2011 @@ -27,9 +27,7 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -extern C { -#include signal.h -} +#include csignal #include cerrno @@ -46,56 +44,69 @@ namespace impl = atf::atf_run; // Auxiliary functions. // -namespace sigalrm { - -bool m_fired = false; -impl::timer* m_timer = NULL; - +static void -handler(const int signo) +handler(int signo, siginfo_t *si, void *uc) { -PRE(signo == SIGALRM); +impl::timer *timer = static_castimpl::timer *(si-si_value.sival_ptr); -m_fired = true; -m_timer-timeout_callback(); +timer-setfired(); +timer-timeout_callback(); } -} // anonymous namespace - // // The timer class. // -impl::timer::timer(const unsigned int seconds) +impl::timer::timer(const unsigned int seconds) : m_fired(false) { -sigalrm::m_fired = false; -sigalrm::m_timer = this; -m_sigalrm.reset(new signal_programmer(SIGALRM, sigalrm::handler)); - -::itimerval timeval; -timeval.it_interval.tv_sec = 0; -timeval.it_interval.tv_usec = 0; -timeval.it_value.tv_sec = seconds; -timeval.it_value.tv_usec = 0; +struct sigaction sa; +::sigemptyset(sa.sa_mask); +sa.sa_flags = SA_SIGINFO; +sa.sa_sigaction = ::handler; +if (::sigaction(SIGALRM, sa, m_old_sa) == -1) +throw system_error(IMPL_NAME ::timer::timer, + Failed to set signal handler, errno); + + +::sigevent se; +se.sigev_notify = SIGEV_SIGNAL; +se.sigev_signo = SIGALRM; +se.sigev_value.sival_ptr = static_castvoid *(this); +se.sigev_notify_function = NULL; +se.sigev_notify_attributes = NULL; +if (::timer_create(CLOCK_MONOTONIC, se, m_timer) == -1) { + ::sigaction(SIGALRM, m_old_sa, NULL); +throw system_error(IMPL_NAME ::timer::timer, + Failed to create timer, errno); +} -if (::setitimer(ITIMER_REAL, timeval, m_old_timeval) == -1) +::itimerspec it; +it.it_interval.tv_sec = 0; +it.it_interval.tv_nsec = 0; +it.it_value.tv_sec = seconds; +it.it_value.tv_nsec = 0; +if (::timer_settime(m_timer, 0, it, m_old_it) == -1) { + ::sigaction(SIGALRM, m_old_sa, NULL); + ::timer_delete(m_timer); throw system_error(IMPL_NAME ::timer::timer, Failed to program timer, errno); +} } impl::timer::~timer(void) { -const int ret = ::setitimer(ITIMER_REAL, m_old_timeval, NULL); +int ret = ::timer_delete(m_timer); +INV(ret != -1); +ret = ::sigaction(SIGALRM, m_old_sa, NULL); INV(ret != -1); -sigalrm::m_timer = NULL; -sigalrm::m_fired = false; } bool impl::timer::fired(void) const { -return sigalrm::m_fired; +return m_fired; } // @@ -121,5 +132,5 @@ impl::child_timer::timeout_callback(void // Should use killpg(2) but, according to signal(7), using this system // call in a signal handler context is not safe. -::kill(m_pid, SIGKILL); +::killpg(-m_pid, SIGKILL); } Index: src/external/bsd/atf/dist/atf-run/timer.hpp diff -u src/external/bsd/atf/dist/atf-run/timer.hpp:1.1.1.2 src/external/bsd/atf/dist/atf-run/timer.hpp:1.2 --- src/external/bsd/atf/dist/atf-run/timer.hpp:1.1.1.2 Wed Oct 20 05:14:23 2010 +++ src/external/bsd/atf/dist/atf-run/timer.hpp Sun Dec 18 17:34:06 2011 @@ -30,12 +30,8 @@ #if !defined(_ATF_RUN_ALARM_HPP_) #define _ATF_RUN_ALARM_HPP_ -extern C { -#include sys/time.h -#include sys/types.h -} - -#include memory +#include ctime +#include csignal #include atf-c++/utils.hpp @@ -49,14 +45,17 @@ class signal_programmer; // class timer : utils::noncopyable { -::itimerval m_old_timeval; -std::auto_ptr signal_programmer m_sigalrm; +::timer_t m_timer; +::itimerspec m_old_it; +struct sigaction
CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: christos Date: Mon Dec 19 03:16:06 UTC 2011 Modified Files: src/external/bsd/atf/dist/atf-run: timer.cpp Log Message: fix killing code I just broke, and give program a chance to cleanup. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-run/timer.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/timer.cpp diff -u src/external/bsd/atf/dist/atf-run/timer.cpp:1.2 src/external/bsd/atf/dist/atf-run/timer.cpp:1.3 --- src/external/bsd/atf/dist/atf-run/timer.cpp:1.2 Sun Dec 18 17:34:06 2011 +++ src/external/bsd/atf/dist/atf-run/timer.cpp Sun Dec 18 22:16:05 2011 @@ -128,9 +128,10 @@ impl::child_timer::~child_timer(void) void impl::child_timer::timeout_callback(void) { +static const timespec ts = { 1, 0 }; m_terminate = true; - -// Should use killpg(2) but, according to signal(7), using this system -// call in a signal handler context is not safe. -::killpg(-m_pid, SIGKILL); +::kill(-m_pid, SIGTERM); +::nanosleep(ts, NULL); +if (::kill(-m_pid, 0) != -1) + ::kill(-m_pid, SIGKILL); }
CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: jmmv Date: Thu Mar 17 19:45:36 UTC 2011 Modified Files: src/external/bsd/atf/dist/atf-run: test-program.cpp Log Message: Pull up revision 3dd2481ec97b2fde76521939b6451d03ce989745 from upstream: Really kill subprocesses of a test case before waiting for its completion Before waiting for any leftover output of the test case after it terminates, we must ensure that all of its subprocess are really, really dead. Otherwise, these subprocesses may be sharing the stdout of the test case, in which case our wait will block (potentially indefinitely). This finally (well, hopefully) fixes some random lockups exposed by the NetBSD test suite. Reported by Antti Kantee after tests/fs/vfs/t_full:p2k_ffs_fillfs was exposing this problem in a pretty reproducible manner. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/dist/atf-run/test-program.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/test-program.cpp diff -u src/external/bsd/atf/dist/atf-run/test-program.cpp:1.7 src/external/bsd/atf/dist/atf-run/test-program.cpp:1.8 --- src/external/bsd/atf/dist/atf-run/test-program.cpp:1.7 Tue Nov 16 17:55:56 2010 +++ src/external/bsd/atf/dist/atf-run/test-program.cpp Thu Mar 17 19:45:36 2011 @@ -1,7 +1,7 @@ // // Automated Testing Framework (atf) // -// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc. +// Copyright (c) 2007, 2008, 2009, 2010, 2011 The NetBSD Foundation, Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -724,10 +724,9 @@ UNREACHABLE; } -::killpg(child_pid, SIGTERM); +::killpg(child_pid, SIGKILL); mux.flush(); atf::process::status status = child.wait(); -::killpg(child_pid, SIGKILL); std::string reason;
CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: pooka Date: Wed Mar 2 16:47:04 UTC 2011 Modified Files: src/external/bsd/atf/dist/atf-run: atf-run.cpp Log Message: In case we get a coredump from a test, autorun gdb to produce a stacktrace (or whatever gdb can give us, which unfortunately is usually not that much). To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/dist/atf-run/atf-run.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/atf-run.cpp diff -u src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.7 src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.8 --- src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.7 Sun Nov 7 17:45:22 2010 +++ src/external/bsd/atf/dist/atf-run/atf-run.cpp Wed Mar 2 16:47:04 2011 @@ -380,15 +380,44 @@ std::pair std::string, const atf::process::status s = impl::run_test_case(tp, tcname, body, tcmd, config, resfile, workdir.get_path(), w); -if (has_cleanup) -(void)impl::run_test_case(tp, tcname, cleanup, tcmd, -config, resfile, workdir.get_path(), w); // TODO: Force deletion of workdir. impl::test_case_result tcr = get_test_case_result(s.first, s.second, resfile); + /* if we have a core, scope out stacktrace */ + size_t slashpos = tp.str().rfind(/); + std::string corename = workdir.get_path().str() + + std::string(/) + tp.str().substr(slashpos+1) + + std::string(.core); + if (s.second.signaled() s.second.coredump() + access(corename.c_str(), F_OK) == 0) { + std::string gdbcmd; + char buf[256]; + char *p; + + gdbcmd = std::string(gdb -batch -q -ex bt ) + + tp.str() + std::string( ) + corename + + std::string( 2 /dev/null); + FILE *gdbstrm = popen(gdbcmd.c_str(), r); + if (gdbstrm) { +w.stderr_tc(std::string(test program crashed, +autolisting stacktrace:)); +while (fgets(buf, sizeof(buf), gdbstrm)) { + if ((p = strchr(buf, '\n')) != NULL) + *p = '\0'; + w.stderr_tc(std::string(buf)); +} +pclose(gdbstrm); +w.stderr_tc(std::string(stacktrace complete)); + } + } + +if (has_cleanup) +(void)impl::run_test_case(tp, tcname, cleanup, tcmd, +config, resfile, workdir.get_path(), w); + w.end_tc(tcr.state(), tcr.reason()); if (tcr.state() == failed) errcode = EXIT_FAILURE;
CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: jmmv Date: Sun Nov 7 17:54:03 UTC 2010 Modified Files: src/external/bsd/atf/dist/atf-run: config_test.cpp integration_test.sh Log Message: Pull in post-release fix 3d5597b0076ade841abf03fc274da72d17cb3ad6 to resolve issues with the default NetBSD settings. Tests were producing invalid results because they were unexpectedly reading the system-wide settings. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/atf/dist/atf-run/config_test.cpp cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/bsd/atf/dist/atf-run/integration_test.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/config_test.cpp diff -u src/external/bsd/atf/dist/atf-run/config_test.cpp:1.1.1.2 src/external/bsd/atf/dist/atf-run/config_test.cpp:1.2 --- src/external/bsd/atf/dist/atf-run/config_test.cpp:1.1.1.2 Wed Oct 20 09:14:23 2010 +++ src/external/bsd/atf/dist/atf-run/config_test.cpp Sun Nov 7 17:54:03 2010 @@ -27,7 +27,9 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // +#include atf-c++/detail/env.hpp #include atf-c++/detail/test_helpers.hpp +#include atf-c++/config.hpp #include atf-c++/macros.hpp #include config.hpp @@ -37,6 +39,14 @@ using atf::tests::vars_map; +namespace atf { +namespace config { + +void __reinit(void); + +} // namespace config +} // namespace atf + // - // Tests for the config parser. // - @@ -351,6 +361,8 @@ ATF_TEST_CASE(read_config_files_none); ATF_TEST_CASE_HEAD(read_config_files_none) {} ATF_TEST_CASE_BODY(read_config_files_none) { +atf::env::set(ATF_CONFDIR, .); +atf::config::__reinit(); ATF_REQUIRE(vars_map() == impl::read_config_files(test-suite)); } Index: src/external/bsd/atf/dist/atf-run/integration_test.sh diff -u src/external/bsd/atf/dist/atf-run/integration_test.sh:1.1.1.3 src/external/bsd/atf/dist/atf-run/integration_test.sh:1.2 --- src/external/bsd/atf/dist/atf-run/integration_test.sh:1.1.1.3 Sun Nov 7 17:43:28 2010 +++ src/external/bsd/atf/dist/atf-run/integration_test.sh Sun Nov 7 17:54:03 2010 @@ -29,6 +29,8 @@ create_atffile() { +ATF_CONFDIR=$(pwd); export ATF_CONFDIR + cat Atffile EOF Content-Type: application/X-atf-atffile; version=1
CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: jmmv Date: Wed Oct 20 16:25:01 UTC 2010 Modified Files: src/external/bsd/atf/dist/atf-run: io_test.cpp Log Message: Per gson@'s request, make these tests less verbose so that the output of atf-run is not twice as large as before. This is a pull-up of 699284e5c0d0a375958293e578af4e02d68d1182. (I don't think it's reasonable to intentionally cripple tests as I have just done here. In the future I would like to only report the output of failed test cases, which would allow us to undo this, but not there yet.) To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/atf/dist/atf-run/io_test.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/io_test.cpp diff -u src/external/bsd/atf/dist/atf-run/io_test.cpp:1.1.1.1 src/external/bsd/atf/dist/atf-run/io_test.cpp:1.2 --- src/external/bsd/atf/dist/atf-run/io_test.cpp:1.1.1.1 Wed Oct 20 09:14:23 2010 +++ src/external/bsd/atf/dist/atf-run/io_test.cpp Wed Oct 20 16:25:01 2010 @@ -328,7 +328,12 @@ class mock_muxer : public atf::atf_run::muxer { void line_callback(const size_t index, const std::string line) { -std::cout line_callback( index , line )\n; +// The following should be enabled but causes the output to be so big +// that it is annoying. Reenable at some point if we make atf store +// the output of the test cases in some other way (e.g. only if a test +// failes), because this message is the only help in seeing how the +// test fails. +//std::cout line_callback( index , line )\n; check_stream(std::cout); switch (index) { case 0: lines0.push_back(line); break;
CVS commit: src/external/bsd/atf/dist/atf-run
Module Name:src Committed By: pooka Date: Sun Jun 27 20:36:43 UTC 2010 Modified Files: src/external/bsd/atf/dist/atf-run: atf-run.cpp Log Message: If get_tcr() is called with broken_reason set, apply xfail inversion. This (at least) makes timeouting tests honor xfail. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-run/atf-run.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-run/atf-run.cpp diff -u src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.3 src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.4 --- src/external/bsd/atf/dist/atf-run/atf-run.cpp:1.3 Wed Jun 16 15:17:37 2010 +++ src/external/bsd/atf/dist/atf-run/atf-run.cpp Sun Jun 27 20:36:42 2010 @@ -222,7 +222,10 @@ const bool default_fail = !config_xfail.empty(); if (!broken_reason.empty()) { -return tcr(tcr::failed_state, broken_reason); +if (default_fail) +return tcr(tcr::xfail_state, config_xfail); +else +return tcr(tcr::failed_state, broken_reason); } if (s.exited()) {