You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by gb...@apache.org on 2018/02/16 17:51:33 UTC

svn commit: r1824543 - in /spamassassin/trunk/t: SATest.pm spf.t

Author: gbechis
Date: Fri Feb 16 17:51:33 2018
New Revision: 1824543

URL: http://svn.apache.org/viewvc?rev=1824543&view=rev
Log:
Fix some regression tests on OpenBSD, bz 7499

Modified:
    spamassassin/trunk/t/SATest.pm
    spamassassin/trunk/t/spf.t

Modified: spamassassin/trunk/t/SATest.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/SATest.pm?rev=1824543&r1=1824542&r2=1824543&view=diff
==============================================================================
--- spamassassin/trunk/t/SATest.pm (original)
+++ spamassassin/trunk/t/SATest.pm Fri Feb 16 17:51:33 2018
@@ -1044,7 +1044,7 @@ sub can_use_net_dns_safely {
   # (which is used by Net::DNS)
 
   return 1 if ($< != 0);
-  return 1 if ($^O =~ /^(linux|mswin|dos|os2)/oi);
+  return 1 if ($^O =~ /^(linux|mswin|dos|os2|openbsd)/oi);
 
   my $has_unsafe_hostname =
     eval { require Sys::Hostname::Long && Sys::Hostname::Long->VERSION < 1.4 };

Modified: spamassassin/trunk/t/spf.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/spf.t?rev=1824543&r1=1824542&r2=1824543&view=diff
==============================================================================
--- spamassassin/trunk/t/spf.t (original)
+++ spamassassin/trunk/t/spf.t Fri Feb 16 17:51:33 2018
@@ -12,6 +12,7 @@ use constant HAS_MAILSPF => eval { requi
 # on non-Linux unices as root, due to a bug in Sys::Hostname::Long
 # (it is used by Mail::SPF::Query, which is now obsoleted by Mail::SPF)
 use constant IS_LINUX   => $^O eq 'linux';
+use constant IS_OPENBSD => $^O eq 'openbsd';
 use constant IS_WINDOWS => ($^O =~ /^(mswin|dos|os2)/i);
 use constant AM_ROOT    => $< == 0;
 
@@ -23,7 +24,7 @@ plan skip_all => "Net tests disabled" un
 plan skip_all => "Need Mail::SPF or Mail::SPF::Query" unless (HAS_SPFQUERY || HAS_MAILSPF);
 plan skip_all => "root required" unless AM_ROOT;
 plan skip_all => "Sys::Hostname::Long > 1.4 required." if HAS_UNSAFE_HOSTNAME;
-plan skip_all => "Test only designed for Windows or Linux" unless (IS_LINUX || IS_WINDOWS);
+plan skip_all => "Test only designed for Windows, Linux or OpenBSD" unless (IS_LINUX || IS_OPENBSD || IS_WINDOWS);
 
 if(HAS_SPFQUERY && HAS_MAILSPF) {
   plan tests => 106;