spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject svn commit: r817096 - /spamassassin/trunk/t/db_awl_perms.t
Date Sun, 20 Sep 2009 20:28:04 GMT
Author: jm
Date: Sun Sep 20 20:28:04 2009
New Revision: 817096

URL: http://svn.apache.org/viewvc?rev=817096&view=rev
Log:
fix db_awl_perms.t failure on Hudson, where SDBM_File is installed instead of DB_File

Modified:
    spamassassin/trunk/t/db_awl_perms.t

Modified: spamassassin/trunk/t/db_awl_perms.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/db_awl_perms.t?rev=817096&r1=817095&r2=817096&view=diff
==============================================================================
--- spamassassin/trunk/t/db_awl_perms.t (original)
+++ spamassassin/trunk/t/db_awl_perms.t Sun Sep 20 20:28:04 2009
@@ -2,7 +2,7 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("db_awl_perms");
-use Test; BEGIN { plan tests => 4 };
+use Test; BEGIN { plan tests => 5 };
 use IO::File;
 
 # ---------------------------------------------------------------------------
@@ -24,11 +24,19 @@
 
 system "ls -l log/user_state";          # for the logs
 
-my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size) = stat "log/user_state/awl";
-ok (($mode & 0777) == 0644);
-
-($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size) = stat "log/user_state/awl.mutex";
-ok (($mode & 0777) == 0644);
-
-ok unlink 'log/user_state/awl';
+sub checkmode {
+  my $fname = shift;
+  if (!-f $fname) { return 1; }
+  my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size) = stat $fname;
+  return (($mode & 0777) == 0644);
+}
+
+ok checkmode "log/user_state/awl";              # DB_File
+ok checkmode "log/user_state/awl.dir";          # SDBM
+ok checkmode "log/user_state/awl.pag";          # SDBM
+ok checkmode "log/user_state/awl.mutex";
+
+unlink 'log/user_state/awl',
+    'log/user_state/awl.dir',
+    'log/user_state/awl.pag';
 ok unlink 'log/user_state/awl.mutex';



Mime
View raw message