Probs with 1.8.0 on Solaris 2.9

I got a failure with yesterday’s snapshot of ruby 1.8.0.
I asked Matz about this, and he asked me to post to the list
to get confirmation from elsewhere about this behaviour. It is
definately repeatable, the build script and its results are below.
This is on a Sparc Solaris 2.9 system, using the “Sun extras” supplied
gcc off their CD.

    Hugh

#!/bin/sh

CC=gcc
HERE=/home/hgs/ruby
RUBYBUILD=$HERE/ruby-snapshot
RUBYHOME=/home/hgs/RUBY-SNAPSHOT
RUBY=$RUBYHOME/bin/ruby
STABLERUBY=/usr/local/bin/ruby
RUBYUNITHOME=$HERE/rubyunit-0.5.4-02
RUBICON=$HERE/Rubicon/rubicon
EDIT=$HERE/sedscript.rb

cat $HERE/build_ruby.sh > $HERE/test_results.tmp
echo ‘---------’ >> $HERE/test_results.tmp

cd $RUBYBUILD
./configure --prefix=$RUBYHOME
gmake clean
gmake
gmake test | tail -1 >> $HERE/test_results.tmp
echo ‘---------’ >> $HERE/test_results.tmp
gmake install

cd $RUBYUNITHOME
$RUBY install.rb

cd $RUBICON
echo ‘---------’ >> $HERE/test_results.tmp
cat $EDIT >> $HERE/test_results.tmp
echo ‘---------’ >> $HERE/test_results.tmp
$CC -v >> $HERE/test_results.tmp 2>&1
$RUBY -v >> $HERE/test_results.tmp
uname -a >> $HERE/test_results.tmp
echo ‘---------’ >> $HERE/test_results.tmp
gmake -f GNUmakefile >> $HERE/test_results.tmp
$STABLERUBY $EDIT $HERE/test_results.tmp > $HERE/test_results

exit

···

test succeeded


#!/usr/local/bin/ruby

Ruby replacement for the sed script I could not get to work.

filter = false
filtering_finished = false
ARGF.readlines.each { |line|
unless filtering_finished
if line =~ /^All Tests/
filter = true
elsif line =~ /^\s+All \d+ files/
filter = false
filtering_finished = true
end
end
if filter
if line =~ /FAIL|====|All/
print line
end
else
print line
end
}

Reading specs from /opt/sfw/lib/gcc-lib/sparc-sun-solaris2.9/2.95.3/specs
gcc version 2.95.3 20010315 (release)
ruby 1.8.0 (2003-02-04) [sparc-solaris2.9]
SunOS neelix 5.9 Generic sun4u sparc SUNW,Ultra-250

/home/hgs/RUBY180/bin/ruby AllTests.rb

========================================================================
All Tests Test Results V0.3.5

              Dir   FAIL     21       78          2
               IO   FAIL     53     1236          2
             Math   FAIL      2       59                   1
           Module   FAIL     25       92          1
             Time   FAIL     41     1687          5

========================================================================
All 72 files FAIL 922 22158 10 1

                         Failure Report

========================================================================

TestDir:

....Expected: "<[]> "
....But was:  "<[\"builtin/_test/_file1\", \"builtin/_test/_file2\"]>"
....Expected: "<[]> "
....But was:  "<[\"builtin/_test/_file1\", \"builtin/_test/_file2\"]>"

        ------------------------------------------------------------

TestIO:

./builtin/TestIO.rb:654:in `test_pos='(TestIO)
./builtin/TestIO.rb:653:in `each'
./builtin/TestIO.rb:653:in `test_pos='
./builtin/TestIO.rb:649:in `open'
./builtin/TestIO.rb:649:in `test_pos='
....Expected: "<0> "
....But was:  "<95>"
./builtin/TestIO.rb:254:in `test_s_select'(TestIO)
./builtin/TestIO.rb:252:in `open'
./builtin/TestIO.rb:252:in `test_s_select'
....Expected: "<[[\#<File:_test/_10lines>], [\#<IO:0xfee50>, \#<IO:0xfee38>], []]> "
....But was:  "<[[\#<File:_test/_10lines>], [\#<IO:0xfee50>, \#<IO:0xfee38>], [\#<File:_test/_10lines>, \#<IO:0xfee50>]]>"

        ------------------------------------------------------------

TestModule:

./builtin/TestModule.rb:199:in `test_instance_methods'(TestModule)
....Expected: "<[\"aClass\"]> "
....But was:  "<[\"aClass2\", \"aClass\"]>"

        ------------------------------------------------------------

TestTime:

./builtin/TestTime.rb:203:in `test_gmtime'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:266:in `test_localtime'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:417:in `test_s_gm'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:436:in `test_s_local'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:458:in `test_s_mktime'(TestTime)
....The condition is <false:FalseClass>

========================================================================

                          Error Report

========================================================================

TestMath:

./builtin/TestMath.rb:118:in `log'(TestMath)
./builtin/TestMath.rb:118:in `test_fns'
....Result too large - "log"

========================================================================

With this

nasun% ruby -v
ruby 1.8.0 (2003-02-05) [sparc-solaris2.8]
nasun%

    ./builtin/TestIO.rb:654:in `test_pos='(TestIO)

Can't reproduce the error

    ./builtin/TestIO.rb:254:in `test_s_select'(TestIO)

Same error that I can reproduce with a C program which just open a file and
call select(3c). Problem solaris ???

    ./builtin/TestModule.rb:199:in `test_instance_methods'(TestModule)

normal if you look at the ruby source

    ./builtin/TestTime.rb:203:in `test_gmtime'(TestTime)

Can't reproduce

    ./builtin/TestMath.rb:118:in `log'(TestMath)

Normal for Solaris, errno was not tested in 1.6. 1.8 test and errno may be
set.

Guy Decoux

OK, maybe it was fixed between 4 and 5…<so I get the latest
which is -06 (and thus still different from yours) and update
Rubyunit while I’m at it>…

$ $RUBY -v
ruby 1.8.0 (2003-02-06) [sparc-solaris2.9]
$ cd Rubicon/rubicon
$ gmake -f GNUmakefile
/home/hgs/RUBY-SNAPSHOT/bin/ruby AllTests.rb

TestContinuation: …
Time: 0.006525
OK (5/5 tests 5 asserts)

TestArray: …F…S…
Time: 0.09614
FAILURES!!!
Test Results:
Run: 65/65(470 asserts) Failures: 1 Errors: 0
Failures: 1
./builtin/ArrayBase.rb:71:in test_MINUS'(TestArray): expected:<[1]> but was:<[1, 1, 1, 1]> (RUNIT::AssertionFailedError) from ./rubicon_tests.rb:379:in run’
from ./rubicon_tests.rb:370:in each' from ./rubicon_tests.rb:370:in run’
from AllTests.rb:28
./rubicon_tests.rb:371:in require': ./builtin/TestBignum.rb:181: parse error (SyntaxError) assert_equal(100001, a**(.5)) ^ ./builtin/TestBignum.rb:182: parse error assert_equal(a.to_f, b**(.5)) ^ from ./rubicon_tests.rb:371:in run’
from ./rubicon_tests.rb:370:in each' from ./rubicon_tests.rb:370:in run’
from AllTests.rb:28
gmake: *** [test] Error 1
$

So it doesn’t even get as far as the summary.

    Hugh
···

On Fri, 7 Feb 2003, ts wrote:

With this

nasun% ruby -v
ruby 1.8.0 (2003-02-05) [sparc-solaris2.8]
nasun%

./builtin/TestIO.rb:654:in `test_pos='(TestIO)

Can’t reproduce the error

Hi,

···

In message “Re: Probs with 1.8.0 on Solaris 2.9” on 03/02/07, Hugh Sasse Staff Elec Eng hgs@dmu.ac.uk writes:

./builtin/TestBignum.rb:182: parse error
assert_equal(a.to_f, b**(.5))

Oops, replace “.5” with “0.5”; I changed the syntax. I updated
rubicon right now.

						matz.

So it doesn't even get as far as the summary.

Well, rubicon must be modified but there are problems specific to Solaris
like select() and log()

Guy Decoux

Hi,

./builtin/TestBignum.rb:182: parse error
assert_equal(a.to_f, b**(.5))

Oops, replace “.5” with “0.5”; I changed the syntax. I updated
rubicon right now.

Thank you. I’ll try again.

  					matz.
    Hugh
···

On Fri, 7 Feb 2003, Yukihiro Matsumoto wrote:

In message “Re: Probs with 1.8.0 on Solaris 2.9” > on 03/02/07, Hugh Sasse Staff Elec Eng hgs@dmu.ac.uk writes:

So I did: I regot the snapshot but it is -06 (When it is
automatically updated?), so here are the new results, after a build,
test, and (this) retest:

#!/bin/sh

CC=/opt/sfw/bin/gcc
export CC
HERE=/home/hgs/ruby
RUBYBUILD=$HERE/ruby-snapshot
RUBYHOME=/home/hgs/RUBY-SNAPSHOT
RUBY=$RUBYHOME/bin/ruby
export RUBY
STABLERUBY=/usr/local/bin/ruby
RUBYUNITHOME=$HERE/rubyunit-0.5.6
RUBICON=$HERE/Rubicon/rubicon
EDIT=$HERE/sedscript.rb

cat $HERE/retest_ruby.sh > $HERE/test_results.tmp
echo ‘---------’ >> $HERE/test_results.tmp

cd $RUBICON
echo ‘---------’ >> $HERE/test_results.tmp
cat $EDIT >> $HERE/test_results.tmp
echo ‘---------’ >> $HERE/test_results.tmp
$CC -v >> $HERE/test_results.tmp 2>&1
$RUBY -v >> $HERE/test_results.tmp
uname -a >> $HERE/test_results.tmp
echo ‘---------’ >> $HERE/test_results.tmp
gmake -f GNUmakefile >> $HERE/test_results.tmp
$STABLERUBY $EDIT $HERE/test_results.tmp > $HERE/test_results

exit

···

On Fri, 7 Feb 2003, Hugh Sasse Staff Elec Eng wrote:

On Fri, 7 Feb 2003, Yukihiro Matsumoto wrote:

Oops, replace “.5” with “0.5”; I changed the syntax. I updated
rubicon right now.

Thank you. I’ll try again.

  					matz.


#!/usr/local/bin/ruby

Ruby replacement for the sed script I could not get to work.

filter = false
filtering_finished = false
ARGF.readlines.each { |line|
unless filtering_finished
if line =~ /^All Tests/
filter = true
elsif line =~ /^\s+All \d+ files/
filter = false
filtering_finished = true
end
end
if filter
if line =~ /FAIL|====|All/
print line
end
else
print line
end
}

Reading specs from /opt/sfw/lib/gcc-lib/sparc-sun-solaris2.9/2.95.3/specs
gcc version 2.95.3 20010315 (release)
ruby 1.8.0 (2003-02-06) [sparc-solaris2.9]
SunOS neelix 5.9 Generic sun4u sparc SUNW,Ultra-250

/home/hgs/RUBY-SNAPSHOT/bin/ruby AllTests.rb

========================================================================
All Tests Test Results V0.3.5

            Array   FAIL     65      470          1
       Assignment   FAIL      4       42          2
      BlocksProcs   FAIL      3       26          1
              Dir   FAIL     21       78          2
             File   FAIL     33      305          1
               IO   FAIL     53     1236          2
        LoopStuff   FAIL     15       56          1
             Math   FAIL      2       59                   1
           Module   FAIL     25       92          1
           String   FAIL     79     1206          1
             Time   FAIL     41     1687          5

========================================================================
All 72 files FAIL 922 38429 17 1

                         Failure Report

========================================================================

TestArray:

./builtin/ArrayBase.rb:71:in `test_MINUS'(TestArray)
....Expected: "<[1]> "
....But was:  "<[1, 1, 1, 1]>"

        ------------------------------------------------------------

TestAssignment:

./language/TestAssignment.rb:35:in `testBasicAssignment'(TestAssignment)
./language/TestAssignment.rb:28:in `greater_or_equal'
./language/TestAssignment.rb:28:in `testBasicAssignment'
....Expected: "<[]> "
....But was:  "<[nil]>"
./language/TestAssignment.rb:135:in `testMultipleAssignment'(TestAssignment)
./language/TestAssignment.rb:134:in `greater_or_equal'
./language/TestAssignment.rb:134:in `testMultipleAssignment'
....Expected: "<[]> "
....But was:  "<[nil]>"

        ------------------------------------------------------------

TestBlocksProcs:

./language/TestBlocksProcs.rb:64:in `testYield'(TestBlocksProcs)
./language/TestBlocksProcs.rb:64:in `f'
./language/TestBlocksProcs.rb:64:in `testYield'
....Expected: "<[]> "
....But was:  "<[nil]>"

        ------------------------------------------------------------

TestDir:

....Expected: "<[]> "
....But was:  "<[\"builtin/_test/_file1\", \"builtin/_test/_file2\"]>"
....Expected: "<[]> "
....But was:  "<[\"builtin/_test/_file1\", \"builtin/_test/_file2\"]>"

        ------------------------------------------------------------

TestFile:

./builtin/TestFile.rb:145:in `test_s_expand_path'(TestFile)
./builtin/TestFile.rb:135:in `open'
./builtin/TestFile.rb:135:in `test_s_expand_path'
....Expected: "</a> "
....But was:  "<//a>"

        ------------------------------------------------------------

TestIO:

./builtin/TestIO.rb:654:in `test_pos='(TestIO)
./builtin/TestIO.rb:653:in `each'
./builtin/TestIO.rb:653:in `test_pos='
./builtin/TestIO.rb:649:in `open'
./builtin/TestIO.rb:649:in `test_pos='
....Expected: "<0> "
....But was:  "<95>"
./builtin/TestIO.rb:254:in `test_s_select'(TestIO)
./builtin/TestIO.rb:252:in `open'
./builtin/TestIO.rb:252:in `test_s_select'
....Expected: "<[[\#<File:_test/_10lines>], [\#<IO:0xfe988>, \#<IO:0xfe970>], []]> "
....But was:  "<[[\#<File:_test/_10lines>], [\#<IO:0xfe988>, \#<IO:0xfe970>], [\#<File:_test/_10lines>, \#<IO:0xfe988>]]>"

        ------------------------------------------------------------

TestLoopStuff:

./language/TestLoopStuff.rb:272:in `testClassFullOfIterators'(TestLoopStuff)
....Expected: "<1> "
....But was:  "<[1]>"

        ------------------------------------------------------------

TestModule:

./builtin/TestModule.rb:199:in `test_instance_methods'(TestModule)
....Expected: "<[\"aClass\"]> "
....But was:  "<[\"aClass\", \"aClass2\"]>"

        ------------------------------------------------------------

TestString:

./builtin/StringBase.rb:622:in `test_index'(TestString)
....Expected: "<3> "
....But was:  "<0>"

        ------------------------------------------------------------

TestTime:

./builtin/TestTime.rb:203:in `test_gmtime'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:266:in `test_localtime'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:417:in `test_s_gm'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:436:in `test_s_local'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:458:in `test_s_mktime'(TestTime)
....The condition is <false:FalseClass>

========================================================================

                          Error Report

========================================================================

TestMath:

./builtin/TestMath.rb:118:in `log'(TestMath)
./builtin/TestMath.rb:118:in `test_fns'
....Result too large - "log"

========================================================================

    Hugh