From: Tanaka Akira Date: 2001-11-12T02:52:41+09:00 Subject: [ruby-talk:24886] Re: ANN: Triple-R - The Rubicon Results Repository In article , Dave Thomas writes: > Tanaka Akira writes: > > > CHILD REAPED > > Thanks - missing a $stderr... :) Thank you for the fix. But another lines are preceeded, now. ---- ././regexp.test ./language/regexp.test ---- I found some problems: * A last line of /etc/passwd may have '+' for NIS. It is not suitable to test home directory. * /dev/tty in Solaris is symbolic link. * flock needs that file is opened as writable. * Bourne shell doesn't exec last command. Index: builtin/TestFile.rb =================================================================== RCS file: /src/rubicon/builtin/TestFile.rb,v retrieving revision 1.23 diff -u -r1.23 TestFile.rb --- builtin/TestFile.rb 2001/11/10 04:45:27 1.23 +++ builtin/TestFile.rb 2001/11/11 17:42:33 @@ -122,7 +122,7 @@ begin users = pw.readlines line = '' - line = users.pop while users.nitems > 0 and line.length == 0 + line = users.pop while users.nitems > 0 and (line.length == 0 || /^\+:/ =~ line) if line.length > 0 name, home = line.split(':').indices(0, -2) assert_equal(home, File.expand_path("~#{name}")) @@ -151,9 +151,15 @@ tests = { "../_test" => "directory", "_file1" => "file", - "/dev/tty" => "characterSpecial", } + begin + tests[File.expand_path(File.readlink("/dev/tty"), "/dev")] = + "characterSpecial" + rescue Errno::EINVAL + tests["/dev/tty"] = "characterSpecial" + end + MsWin32.dont do tests["_file3"] = "link" tests["_sock"] = "socket" @@ -482,7 +488,7 @@ pid = fork if pid - File.open("_file1") { |f| + File.open("_file1", "w") { |f| trap("USR1") { assert_equal(false, f.flock(File::LOCK_EX | File::LOCK_NB)) Process.kill "KILL", pid @@ -494,8 +500,9 @@ assert_fail("Never got signalled") } else - File.open("_file1") { |f| + File.open("_file1", "w") { |f| assert_equal(0, f.flock(File::LOCK_EX)) + sleep 1 Process.kill "USR1", Process.ppid sleep 10 assert_fail "Parent never killed us" Index: builtin/TestIO.rb =================================================================== RCS file: /src/rubicon/builtin/TestIO.rb,v retrieving revision 1.21 diff -u -r1.21 TestIO.rb --- builtin/TestIO.rb 2001/11/06 23:53:49 1.21 +++ builtin/TestIO.rb 2001/11/11 17:42:38 @@ -609,7 +609,7 @@ def test_pid assert_nil($stdin.pid) - pipe = IO.popen("#$interpreter -e 'p $$'", "r") + pipe = IO.popen("exec #$interpreter -e 'p $$'", "r") pid = pipe.gets assert_equal(pid.to_i, pipe.pid) pipe.close Index: language/TestRegularExpressions.rb =================================================================== RCS file: /src/rubicon/language/TestRegularExpressions.rb,v retrieving revision 1.3 diff -u -r1.3 TestRegularExpressions.rb --- language/TestRegularExpressions.rb 2001/11/11 04:00:10 1.3 +++ language/TestRegularExpressions.rb 2001/11/11 17:42:46 @@ -47,7 +47,6 @@ start = File.dirname($0) for base in [".", "language"] file_name = File.join(start, base, 'regexp.test') - puts file_name break if File.exist? file_name file_name = nil end -- Tanaka Akira