Skip Menu |

This queue is for tickets about the MIME-tools CPAN distribution.

Report information
The Basics
Id: 77351
Status: resolved
Priority: 0/
Queue: MIME-tools

People
Owner: dfs+pause [...] roaringpenguin.com
Requestors: shay [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 5.502
Fixed in: (no value)



Subject: [PATCH] Skip test using fork() when fork() is not available
The t/Smtpsend.t test uses fork() and therefore fails when using a perl which does not have fork() implemented, e.g. on a Windows system when perl is built without PERL_IMPLICIT_SYS defined. The attached patch arranges for all the tests to be skipped in this case, using an idiom borrowed from a fork() test in Test-Simple, and also checking for (the fairly recentlt added) d_pseudofork option too.
Subject: MIME-tools-fork.patch
diff -ruN MIME-tools-5.502.orig/t/Smtpsend.t MIME-tools-5.502/t/Smtpsend.t --- MIME-tools-5.502.orig/t/Smtpsend.t 2008-09-22 21:54:52.000000000 +0100 +++ MIME-tools-5.502/t/Smtpsend.t 2012-05-22 08:50:25.226816300 +0100 @@ -1,7 +1,18 @@ #!/usr/bin/perl -w use strict; use warnings; -use Test::More tests => 9; +use Config; +use Test::More; +my $can_fork = $Config{d_fork} || $Config{d_pseudofork} || + (($^O eq 'MSWin32' || $^O eq 'NetWare') and + $Config{useithreads} and + $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/); +if ($can_fork) { + plan tests => 9; +} +else { + plan skip_all => 'This system cannot fork'; +} use MIME::Tools; use MIME::Entity;
Subject: Re: [rt.cpan.org #77351] [PATCH] Skip test using fork() when fork() is not available
Date: Thu, 24 May 2012 11:59:44 -0400
To: bug-MIME-tools [...] rt.cpan.org
From: "David F. Skoll" <dfs [...] roaringpenguin.com>
Hi, Steve, Show quoted text
> The attached patch arranges for all the tests to be skipped in this > case, using an idiom borrowed from a fork() test in Test-Simple, and > also checking for (the fairly recentlt added) d_pseudofork option too.
Thanks for the patch. I've applied it and the fix will be in the next MIME-tools release. Regards, David.
Hi, I have just uploaded MIME-tools-5.503 to CPAN, which I believe resolves this ticket. Regards, David.