unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Jeremy Evans <jeremyevans0@gmail.com>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Fix hang when running tests on OpenBSD by skipping two tests
Date: Tue, 15 Nov 2011 00:46:31 +0100	[thread overview]
Message-ID: <CADGZSScuP_-N8QPOBiciNAECPyr6qVqLm54b8dHLdA_TMsXjvg@mail.gmail.com> (raw)
In-Reply-To: <20111114205429.GA15731@dcvr.yhbt.net>

On Mon, Nov 14, 2011 at 9:54 PM, Eric Wong <normalperson@yhbt.net> wrote:
> Jeremy Evans <jeremyevans0@gmail.com> wrote:
>> This is obviously not a permanent fix, but I'm not sure why the tests
>> are hanging, and hanging during a test is bad.  I suppose you could
>> also use a timeout, so the test fails instead of hangs.  I'll be happy
>> to test other patches to either the test suite or the library code
>> (assuming the hang is fixable on OpenBSD).
>
> I'd like to investigate why this fails.

Makes sense.  Is there something I can do to help debug?

> So everything under t/ (gmake test-integration) works, too?
> I much prefer shell-based the test suite myself

I didn't even know about that test suite till now. :)

I started running those tests on OpenBSD.  With the way the test suite
is currently setup, it's a bit of a pain to debug, as it stops at the
first error.  So I have to:

1) run the entire test suite
2) wait for it to halt/fail
3) skip the test that halts/fails
4) go to step 1

With some small changes, you can make it through the entire test suite
even if there are errors.  It would greatly speed up the debugging
process, but it does require you read the logged output.  See the
patch below.  With it, I determined the following integration tests
hang/fail:

ruby 1.8.7 and ruby 1.9.3 integration test failures:

t0011-active-unix-socket.sh
# fails: not ok 11 - no errors
t0100-rack-input-tests.sh
# hangs: requires kill to unicorn and kill -9 to sh in the 2nd test

ruby 1.9.3 has a couple regular test failures (skipping the two hangs
with the earlier patch):

:   1) Error:
: test_parse_error(HttpParserTest):
: RuntimeError: can't set length of shared string
:     test/unit/test_http_parser.rb:350:in `headers'
:     test/unit/test_http_parser.rb:350:in `test_parse_error'

:   1) Failure:
: test_help(ExecTest) [test/exec/test_exec.rb:319]:
: <0> expected but was
: <158>.

Thanks,
Jeremy

$OpenBSD$
--- GNUmakefile.orig    Tue Nov 15 00:12:58 2011
+++ GNUmakefile Tue Nov 15 00:13:32 2011
@@ -124,14 +124,14 @@ run_test = $(quiet_pre) \
 %.n: export PATH := $(test_prefix)/bin:$(PATH)
 %.n: export RUBYLIB := $(test_prefix):$(test_prefix)/lib:$(MYLIBS)
 %.n: $(test_prefix)/.stamp
-       $(run_test)
+       -$(run_test)

 $(T): arg = $@
 $(T): t = $(subst .rb,$(log_suffix),$@)
 $(T): export PATH := $(test_prefix)/bin:$(PATH)
 $(T): export RUBYLIB := $(test_prefix):$(test_prefix)/lib:$(MYLIBS)
 $(T): $(test_prefix)/.stamp
-       $(run_test)
+       -$(run_test)

 install: $(bins) $(ext)/unicorn_http.c
        $(prep_setup_rb)
@@ -221,7 +221,7 @@ $(T_r).%.r: export RUBYLIB := $(test_prefix):$(test_pr
 $(T_r).%.r: export UNICORN_RAILS_TEST_VERSION = $(rv)
 $(T_r).%.r: export RAILS_GIT_REPO = $(CURDIR)/$(rails_git)
 $(T_r).%.r: $(test_prefix)/.stamp $(rails_git)/info/v2.2.3-stamp
-       $(run_test)
+       -$(run_test)

 ifneq ($(VERSION),)
 rfproject := mongrel

--- t/GNUmakefile.orig  Tue Nov 15 00:12:39 2011
+++ t/GNUmakefile       Tue Nov 15 00:12:50 2011
@@ -66,7 +66,7 @@ $(T): export RAKE := $(RAKE)
 $(T): export PATH := $(test_prefix)/bin:$(PATH)
 $(T): export RUBYLIB := $(test_prefix)/lib:$(MYLIBS)
 $(T): dep $(test_prefix)/.stamp trash/.gitignore
-       $(TRACER) $(SHELL) $(SH_TEST_OPTS) $@ $(TEST_OPTS)
+       -$(TRACER) $(SHELL) $(SH_TEST_OPTS) $@ $(TEST_OPTS)

 trash/.gitignore:
        mkdir -p $(@D)
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

  reply	other threads:[~2011-11-15  0:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 19:33 Fix hang when running tests on OpenBSD by skipping two tests Jeremy Evans
2011-11-14 20:54 ` Eric Wong
2011-11-14 23:46   ` Jeremy Evans [this message]
2011-11-15  3:17     ` Eric Wong
2011-11-15 20:03       ` Jeremy Evans
2011-11-15 21:19         ` Jeremy Evans
2011-11-15 22:36         ` Eric Wong
2011-11-16  1:18         ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADGZSScuP_-N8QPOBiciNAECPyr6qVqLm54b8dHLdA_TMsXjvg@mail.gmail.com \
    --to=jeremyevans0@gmail.com \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).