You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2009/12/23 19:14:34 UTC

[Bug 6263] New: Test sa_compile fails

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

           Summary: Test sa_compile fails
           Product: Spamassassin
           Version: 3.3.0
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Regression Tests
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: schulz@adi.com


This shows up with RC1 Proposed 2 running on a Solaris 8 Sparc machine. Perl is
version 5.8.5. Test sa_compile fails as follows:

t/sa_compile........................1/5 can't open -V
'/home/projects/tools/spamassassin/Mail-SpamAssassin-3.3.0-rc1/t/log/d.sa_compile/inst.basic/foo/bin/sa-compile
--keep-tmps' failed: exit 1 at t/SATest.pm line 934.
t/sa_compile........................ Dubious, test returned 2 (wstat 512,
0x200)
 Failed 3/5 subtests

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] [review] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #12 from Mark Martinec <Ma...@ijs.si> 2010-01-15 09:45:52 UTC ---
+1

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] [review] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #13 from Mark Martinec <Ma...@ijs.si> 2010-01-15 09:52:57 UTC ---
A nitpick: the operator '>' and the comment are not in sync:

$re2c_ver+0 > 001200   # 0.12.0 seems safe enough as a baseline

Perhaps it should be a '>='

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] [review] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #4641|0                           |1
        is obsolete|                            |

--- Comment #15 from Justin Mason <jm...@jmason.org> 2010-01-15 10:16:17 UTC ---
Created an attachment (id=4642)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4642)
proposed patch v2

Kevin -- use "prove -v" to see stdout output.  that's pretty standard practice,
hiding that kind of warning unless -v is used...

this patch includes the >= fix.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] [review] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1
           Severity|normal                      |blocker

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] sa_compile.t test fails if installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #8 from Mark Martinec <Ma...@ijs.si> 2010-01-13 08:41:54 UTC ---
> Makefile.PL checks for missing Perl modules. Can it check for other things?

At the moment the Util/DependencyInfo.pm (as run at make time) only knows
how to check Perl modules. Not sure about the rest of the Makefile.PL
infrastructure.

> Checking for a working re2c at that point would be a good idea if it could
> be done.

I'm not sure we know what version of re2c is the recommended minimum.
There were bugs in some versions causing an occasional crash if I remember
correctly. The re2c-0.13.5 seems fine.

For now, I'd be inclined to only mention recommending a recent version
of re2c in release notes, and not automatically enforce anything.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] [review] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #17 from Mark Martinec <Ma...@ijs.si> 2010-01-15 12:03:22 UTC ---
resolved

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] sa_compile.t test fails if installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #7 from Tom Schulz <sc...@adi.com> 2010-01-13 08:22:36 UTC ---
Makefile.PL checks for missing Perl modules. Can it check for other things?
Checking for a working re2c at that point would be a good idea if it could
be done.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|sa_compile.t test fails if  |sa_compile.t test fails if
                   |installed re2c version is   |re2c not found, or
                   |too old                     |installed re2c version is
                   |                            |too old

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] Test sa_compile fails

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #3 from Mark Martinec <Ma...@ijs.si> 2009-12-24 06:57:17 UTC ---
> There was a lot of output so I am attempting to attach it.

Thanks. 

The following stands out:

  /home/projects/tools/spamassassin/Mail-SpamAssassin-3.3.0-rc1/t/
    log/d.sa_compile/inst.basic/foo/bin/sa-compile --keep-tmps

  requires re2c for proper operation.

  Dubious, test returned 2 (wstat 512, 0x200)



> In addition to the log, the following showed
> up on the terminal screen.
> 
> can't open -V
> '/home/projects/tools/spamassassin/Mail-SpamAssassin-3.3.0-rc1/t/log/d.sa_compile/inst.basic/foo/bin/sa-compile
> --keep-tmps' failed: exit 1 at t/SATest.pm line 934.

The "-V" probably comes from sa-compile:

unless (qx(re2c -V)) {
  print "$0 requires re2c for proper operation.\n"
    or die "error writing: $!";
  exit 1;
}


So, either you don't have re2c installed or visible in the path,
or it does not understand option -V (perhaps it is too old).

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] sa_compile.t test fails if installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #10 from Justin Mason <jm...@jmason.org> 2010-01-15 09:33:47 UTC ---
Created an attachment (id=4641)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4641)
proposed patch

This patch adds a test for 're2c -V' using the current $PATH; if it doesn't
exist, or is too old, the test is simply skipped.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] Test sa_compile fails

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #5 from Tom Schulz <sc...@adi.com> 2009-12-24 10:52:46 UTC ---
The old re2c was the problem. If I run the old one with 're2c -V' the output
is 'can't open -V' I now have re2c 0.13.5 installed and the sa_compile test
passes.

The '-V' switch is used to get the version. Perhaps a failure to get the
version that way could be taken as an indication of a very old version
and give an appropriate message.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] [review] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|sa_compile.t test fails if  |[review] sa_compile.t test
                   |re2c not found, or          |fails if re2c not found, or
                   |installed re2c version is   |installed re2c version is
                   |too old                     |too old

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] [review] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kmcgrail@pccc.com

--- Comment #14 from Kevin A. McGrail <km...@pccc.com> 2010-01-15 10:11:33 UTC ---
Concur that rc3(In reply to comment #13)
> A nitpick: the operator '>' and the comment are not in sync:
> 
> $re2c_ver+0 > 001200   # 0.12.0 seems safe enough as a baseline
> 
> Perhaps it should be a '>='

I patched with patch above changed to >= and ran make test 

t/sa_compile......................skipped
        all skipped: no reason given

I'm +1 and +1 if JM determines > or >= is better.  A warn or output that it was
skipped because re2c not found in the path sounds like a good idea, though.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] Test sa_compile fails

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P5                          |P2
   Target Milestone|Undefined                   |3.3.0

--- Comment #1 from Mark Martinec <Ma...@ijs.si> 2009-12-23 15:32:09 UTC ---
> t/sa_compile........................1/5 can't open -V
> '/home/projects/tools/spamassassin/Mail-SpamAssassin-3.3.0-rc1/t/log/d.sa_compile/inst.basic/foo/bin/sa-compile
> --keep-tmps' failed: exit 1 at t/SATest.pm line 934.

Is a verbose test run more specific?

  $ prove -v t/sa_compile.t

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] Test sa_compile fails

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #2 from Tom Schulz <sc...@adi.com> 2009-12-23 20:34:13 UTC ---
Created an attachment (id=4615)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4615)
test log

There was a lot of output so I am attempting to attach it. I created the log on
the Solaris machine and ftp'd it to my home PC. If you get garbage, I can go
into
work sometime soon and try again. In addition to the log, the following showed
up on the terminal screen.

can't open -V
'/home/projects/tools/spamassassin/Mail-SpamAssassin-3.3.0-rc1/t/log/d.sa_compile/inst.basic/foo/bin/sa-compile
--keep-tmps' failed: exit 1 at t/SATest.pm line 934.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] sa_compile.t test fails if installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jm@jmason.org
            Summary|Test sa_compile fails       |sa_compile.t test fails if
                   |                            |installed re2c version is
                   |                            |too old

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] Test sa_compile fails

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #4 from Tom Schulz <sc...@adi.com> 2009-12-24 09:39:08 UTC ---
It looks like Solaris does not come with a re2c. We have one that was built
in 1994 on a SunOS 4.something system. It is version 0.5 and does not
understand
-V. Is the need for re2c documented somewhere? I will look into getting a newer
version of re2c. I expect that the old re2c is the whole problem and the test
will run OK if I get a new one.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] Test sa_compile fails

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #6 from Tom Schulz <sc...@adi.com> 2009-12-27 10:49:24 UTC ---
Ah, the error message 'can't open -V' comes out on standard error, not standard
output. Also, it exits with an error status. Perhaps it is too much work to
catch this particular error condition. It would be good if the test could
output the 'requires re2c for proper operation' error message. That would help.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] sa_compile.t test fails if installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #9 from Justin Mason <jm...@jmason.org> 2010-01-13 08:43:14 UTC ---
(In reply to comment #7)
> Makefile.PL checks for missing Perl modules. Can it check for other things?
> Checking for a working re2c at that point would be a good idea if it could
> be done.

the test script itself can detect that, and it's the best place to do it, if
we're going to do it.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] [review] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|                            |can be committed

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] [review] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #16 from Mark Martinec <Ma...@ijs.si> 2010-01-15 12:02:29 UTC ---
(In reply to comment #15)
> Created an attachment (id=4642)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4642)
> proposed patch v2

Rolling-in this Justin's patch.

Bug 6263: sa_compile.t test fails if re2c not found, or
installed re2c version is too old
Sending t/sa_compile.t
Committed revision 899793.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6263] [review] sa_compile.t test fails if re2c not found, or installed re2c version is too old

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6263

--- Comment #11 from Justin Mason <jm...@jmason.org> 2010-01-15 09:35:34 UTC ---
for background, this test failing is a release nixer:

On Friday 15 January 2010 17:38:38 Kevin A. McGrail wrote:
> I tried simply a make test on the rc3 and failed on timeout.t and
> sa_compile.t with long tests and net tests.
>
> sa_compile is:
>
> t/sa_compile......................ok 1/5Can't exec "re2c": No such file or
> directory at
> /usr/src/Mail-SpamAssassin-3.3.0/t/log/d.sa_compile/inst.basic/foo/bin/sa-c
> ompile line 113.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.