みやむこです。

nobu.nakada / nifty.ne.jp wrote:
>>HP-UX と UX/4800 の場合、fclose が EOF を返しても errno が設定されない
>>> 場合があるようです。このことが原因でしょうか。
> 
> 
> [ruby-dev:22493]のパッチを当てるとどうなるでしょうか。

すでにコミットされているようなので今朝の CVS HEAD で試したところ
以下のエラーがでました。

* make install で RI の作成でエラー
* test/soap で undefined superclass `StandaloneServer' (TypeError)
* test/drb で core dump
* drb, soap 以外のテストでいくつか failure

>  また、これはちゃんとエラーになるでしょうか。

> $ ruby -e 'f = open("/dev/null"); IO.new(f.fileno).close; f.close'

% ruby19 -ve 'f = open("/dev/null"); IO.new(f.fileno).close; f.close'
ruby 1.9.0 (2004-01-06) [hppa2.0n-hpux11.11]
-e:1:in `close': Bad file number - /dev/null (Errno::EBADF)
        from -e:1


以下詳細です。

% ./configure --prefix=/opt/ruby190 --program-suffix=19 --disable-ipv6
 --without-gcc && touch lex.c && make && make test
  :
test succeeded
# make install
  :
Generating RI...
./lib/yaml.rb:17:in `require': No such file to load -- yaml/parser (LoadError)
        from ./lib/yaml.rb:17
        from ./lib/rdoc/ri/ri_descriptions.rb:1:in `require'
        from ./lib/rdoc/ri/ri_descriptions.rb:1
        from ./lib/rdoc/ri/ri_reader.rb:1:in `require'
        from ./lib/rdoc/ri/ri_reader.rb:1
        from ./lib/rdoc/generators/ri_generator.rb:46:in `require'
        from ./lib/rdoc/generators/ri_generator.rb:46
        from ./lib/rdoc/rdoc.rb:243:in `require'
        from ./lib/rdoc/rdoc.rb:243:in `document'
        from bin/rdoc:63
*** Error exit code 1

Stop.

とりあえずすべてのテストを実行すると以下のエラーになりました。
まっさらな状態から make したので [ruby-list:38936] のように昔の makefile
が残っているということはありません。

% ruby19 test/runner.rb -v
/work3/home/miyamuko/src/ruby-1.9.0-20040107/test/soap/helloworld/hw_s.rb:3: und
efined superclass `StandaloneServer' (TypeError)
	from ./test/soap/helloworld/test_helloworld.rb:6:in `require'
	from ./test/soap/helloworld/test_helloworld.rb:6
	from /opt/ruby190/lib/ruby/1.9/test/unit/collector/dir.rb:76:in `require
'
	from /opt/ruby190/lib/ruby/1.9/test/unit/collector/dir.rb:76:in `collect
_file'
	from /opt/ruby190/lib/ruby/1.9/test/unit/collector/dir.rb:58:in `recursi
ve_collect'
	from /opt/ruby190/lib/ruby/1.9/test/unit/collector/dir.rb:50:in `each'
	from /opt/ruby190/lib/ruby/1.9/test/unit/collector/dir.rb:50:in `recursi
ve_collect'
	from /opt/ruby190/lib/ruby/1.9/test/unit/collector/dir.rb:54:in `recursi
ve_collect'
	 ... 7 levels...
	from /opt/ruby190/lib/ruby/1.9/test/unit/autorunner.rb:54:in `[]'
	from /opt/ruby190/lib/ruby/1.9/test/unit/autorunner.rb:183:in `run'
	from /opt/ruby190/lib/ruby/1.9/test/unit/autorunner.rb:13:in `run'
	from test/runner.rb:7
zsh: exit 1     ruby19 test/runner.rb -v


DRb だけのテストです。io_write で似たようなエラーになりました。

% ruby19 test/runner.rb -v -a test/drb
Loaded suite drb
Started
  :
test_05_too_large_ary(TestDRbLarge): /opt/ruby190/lib/ruby/1.9/drb/drb.rb:584: [
BUG] rb_sys_fail() - errno == 0
ruby 1.9.0 (2004-01-06) [hppa2.0n-hpux11.11]

zsh: abort (core dumped)  ruby19 test/runner.rb -v -a test/drb
% gdb =ruby19 core
HP gdb 2.1
Copyright 1986 - 1999 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 2.1 (based on GDB 5.0-hpwdb-20000630)
Wildebeest is free software, covered by the GNU General Public License, and
you are welcome to change it and/or distribute copies of it under certain
conditions.  Type "show copying" to see the conditions.  There is
absolutely no warranty for Wildebeest.  Type "show warranty" for details.
Wildebeest was built for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00.
..
Core was generated by `ruby19'.
Program terminated with signal 6, Aborted.

warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.

#0  0xc01ffd40 in kill () from /usr/lib/libc.2
(gdb) bt
#0  0xc01ffd40 in kill () from /usr/lib/libc.2
#1  0xc019b3b4 in raise () from /usr/lib/libc.2
#2  0xc01db550 in abort_C () from /usr/lib/libc.2
#3  0xc01db5ac in abort () from /usr/lib/libc.2
#4  0x504e0 in rb_bug (fmt=0xeafc8 "rb_sys_fail(%s) - errno == 0")
    at error.c:207
#5  0x51f28 in rb_sys_fail (mesg=0x0) at error.c:986
#6  0x65794 in io_write (io=1075737864, str=1076012328) at io.c:451
#7  0x2d7b4 in call_cfunc (func=0x40019622 <io_write>, recv=1075737864, len=1,
    argc=1, argv=0x7f7fc438) at eval.c:5359
#8  0x2e2a0 in rb_call0 (klass=1074114336, recv=1075737864, id=7057, oid=7057,
    argc=1, argv=0x7f7fc438, body=0x4005a890, nosuper=0) at eval.c:5487
#9  0x2ef28 in rb_call (klass=1074114336, recv=1075737864, mid=7057, argc=1,
    argv=0x7f7fc438, scope=0) at eval.c:5708
#10 0x271f0 in rb_eval (self=1076005464, n=0x3f7a) at eval.c:3236
Error accessing memory address 0x0: Invalid argument.
(gdb) q


soap, DRb 以外のテストです。

% mv test/soap test/drb .
% ruby19 test/runner.rb
/opt/ruby190/lib/ruby/1.9/pp.rb:158: warning: already initialized constant Inspe
ctKey
Loaded suite test
Started
.............FF.F.......FF......................................................
................................................................................
................................................................................
................................................................................
......................................................................./test/rub
y/test_system.rb:14: warning: Insecure world writable dir /work3/home/miyamuko/b
in, mode 040777
./test/ruby/test_system.rb:21: warning: Insecure world writable dir /work3/home/
miyamuko/bin, mode 040777
./test/ruby/test_system.rb:22: warning: Insecure world writable dir /work3/home/
miyamuko/bin, mode 040777
./test/ruby/test_system.rb:29: warning: Insecure world writable dir /work3/home/
miyamuko/bin, mode 040777
./test/ruby/test_system.rb:39: warning: Insecure world writable dir /work3/home/
miyamuko/bin, mode 040777
./test/ruby/test_system.rb:40: warning: Insecure world writable dir /work3/home/
miyamuko/bin, mode 040777
................................................................................
..............................................................................EE
...............................................................................
Finished in 426.148571 seconds.

  1) Failure:
test_ipv4_compat(InlineTest::TC_IPAddr) [(eval):98]:
<"::192.168.1.2"> expected but was
<"ffff:ffff:ffff:ffff:ffff:ffff:c0a8:102">.

  2) Failure:
test_ipv4_mapped(InlineTest::TC_IPAddr) [(eval):115]:
<"::ffff:192.168.1.2"> expected but was
<"ffff:ffff:ffff:ffff:ffff:ffff:c0a8:102">.

  3) Failure:
test_s_new(InlineTest::TC_IPAddr) [(eval):20]:
<"123:4567:89ab:cdef:abc:def0:1234:5678"> expected but was
<"f123:4567:89ab:cdef:abc:def0:1234:5678">.

  4) Failure:
test_shift_left(InlineTest::TC_Operator) [(eval):192]:
<"505:2::"> expected but was
<"f505:2::">.

  5) Failure:
test_shift_right(InlineTest::TC_Operator) [(eval):184]:
<"0:3ffe:505:2::"> expected but was
<"ffff:3ffe:505:2::">.

  6) Error:
test_raa(WSDL::RAA::TestRAA):
LoadError: No such file to load -- soap/mimemessage
    /opt/ruby190/lib/ruby/1.9/soap/rpc/router.rb:15:in `require'
    /opt/ruby190/lib/ruby/1.9/soap/rpc/router.rb:15
    /opt/ruby190/lib/ruby/1.9/soap/rpc/soaplet.rb:11:in `require'
    /opt/ruby190/lib/ruby/1.9/soap/rpc/soaplet.rb:11
    /opt/ruby190/lib/ruby/1.9/soap/rpc/standaloneServer.rb:10:in `require'
    /opt/ruby190/lib/ruby/1.9/soap/rpc/standaloneServer.rb:10
    /work3/home/miyamuko/src/ruby-1.9.0-20040107/test/wsdl/raa/RAAService.rb:4:i
n `require'
    /work3/home/miyamuko/src/ruby-1.9.0-20040107/test/wsdl/raa/RAAService.rb:4
    ./test/wsdl/raa/test_raa.rb:23:in `require'
    ./test/wsdl/raa/test_raa.rb:23:in `setup_server'
    ./test/wsdl/raa/test_raa.rb:15:in `setup'

  7) Error:
test_raa(WSDL::RAA::TestRAA):
NoMethodError: undefined method `shutdown' for nil:NilClass
    ./test/wsdl/raa/test_raa.rb:52:in `teardown_server'
    ./test/wsdl/raa/test_raa.rb:47:in `teardown'

628 tests, 6419 assertions, 5 failures, 2 errors


--
みやむこ