Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2012 15:52:43 -0800 (AKDT)
From:      Mel Flynn <rflynn@acsalaska.net>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        Steve Wills <swills@FreeBSD.net>, Maintainer <perl@freebsd.org>
Subject:   [patch] www/p5-WWW-Mechanize: fix test hangs.
Message-ID:  <201204062352.q36Nqh3J067865@datakitty.lan.rachie.is-a-geek.net>

next in thread | raw e-mail | index | archive | help

>Submitter-Id:	current-users
>Originator:	Mel Flynn
>Organization:	
>Confidential:	no 
>Synopsis:	[patch] www/p5-WWW-Mechanize: fix test hangs.
>Severity:	non-critical
>Priority:	low
>Category:	ports
>Class:		sw-bug
>Release:	FreeBSD 8.2-STABLE amd64
>Environment:
System: FreeBSD datakitty.lan.rachie.is-a-geek.net 8.2-STABLE FreeBSD 8.2-STABLE #6 r230977: Sun Feb 5 06:20:11 AKST 2012 mel@datakitty.lan.rachie.is-a-geek.net:/data/obj/data/RELENG_8/src/sys/GENERIC amd64


>Description:
Tests in t/local all use LocalServer.pm, a module emulating a HTTP server.
This module closes a file handle from the child, after sending a
'quit_server' URL. This is supposed to stop the server, but does not on
FreeBSD, for reasons I'm unable to determine.
The filehandle cannot be closed SIGINFO shows that perl is in 'accept'.

>How-To-Repeat:

cd /usr/ports/www/p5-WWW-Mechanize
make build
cd `make -V WRKSRC`
make test

>Fix:

The fix below is a work around. It kills the server using a SIGTERM to the
server pid. It doesn't impact the test results.
Issue submitted upstream:
http://code.google.com/p/www-mechanize/issues/detail?id=234

--- www__p5-WWW-Mechanize.patch begins here ---
diff -urN --exclude CVS --exclude '*~' www/p5-WWW-Mechanize/files/patch-t__local__LocalServer.pm /usr/ports/www/p5-WWW-Mechanize/files/patch-t__local__LocalServer.pm
--- www/p5-WWW-Mechanize/files/patch-t__local__LocalServer.pm.orig	1969-12-31 14:00:00.000000000 -1000
+++ www/p5-WWW-Mechanize/files/patch-t__local__LocalServer.pm	2012-04-06 14:37:36.000000000 -0800
@@ -0,0 +1,11 @@
+--- t/local/LocalServer.pm.orig	2011-08-05 12:48:08.000000000 -0800
++++ t/local/LocalServer.pm	2012-04-06 14:37:36.000000000 -0800
+@@ -152,7 +152,7 @@
+ sub stop {
+     my ($self) = @_;
+     get( $self->quit_server );
+-    undef $self->{_server_url};
++    $self->kill();
+     if ( $self->{_fh} ) {
+         close $self->{_fh};
+         delete $self->{_fh};
--- www__p5-WWW-Mechanize.patch ends here ---




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204062352.q36Nqh3J067865>