Bug #7482

test_system_redirect_win(TestSystem) failure on Windows 8

Added by Heesob Park over 1 year ago. Updated about 1 year ago.

[ruby-core:50396]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
Category:test
Target version:2.0.0
ruby -v:ruby -v: ruby 2.0.0dev (2012-11-29) [x64-mingw32] Backport:

Description

I found the following test failure on Windows 8.

testsystemredirectwin(TestSystem) [c:/work/snapshot-mg64/test/ruby/testsystem.rb:123]:
.
expected but was
.

I think the testsystemredirect_win is a wrong test case.
the ping command is not the point of .
And the ping result may differ depending on the machine.

Associated revisions

Revision 38956
Added by Nobuyoshi Nakada about 1 year ago

test_system.rb: fix test

  • test/ruby/testsystem.rb (TestSystem#testsystemredirectwin): fix meaningless test. [Bug #7482]

Revision 38958
Added by Nobuyoshi Nakada about 1 year ago

test_system.rb: commit miss

  • test/ruby/testsystem.rb (TestSystem#testsystemredirectwin): fix intentional failure left carelessly. [Bug #7482]

History

#1 Updated by Usaku NAKAMURA over 1 year ago

Ah, I should check these Win8 tickets, but I have no time before the release
limit of preview 2.

Committers, please check the tickets and fix them (if you can) before the release...

#2 Updated by Usaku NAKAMURA over 1 year ago

  • Status changed from Open to Assigned
  • Assignee set to Usaku NAKAMURA

#3 Updated by Usaku NAKAMURA over 1 year ago

  • Status changed from Assigned to Feedback
  • Assignee changed from Usaku NAKAMURA to Motohiro KOSAKI

I can't understand this test.
Kosaki-san, can you describe?

#4 Updated by Eric Hodel about 1 year ago

Kosaki-san, can you check this issue?

#5 Updated by Nobuyoshi Nakada about 1 year ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r38956.
Heesob, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


test_system.rb: fix test

  • test/ruby/testsystem.rb (TestSystem#testsystemredirectwin): fix meaningless test. [Bug #7482]

#6 Updated by Heesob Park about 1 year ago

As you can see in http://ci.rubyinstaller.org/job/ruby-trunk-x64-test-all/607/console,
This issues is not solved with changeset r38956.

1) Failure:
testsystemredirectwin(TestSystem) [C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/test/ruby/testsystem.rb:144]:

out.txt:
err.txt:
"'\"C:\Windows/system32/find.exe BFI3CHL671\"' is not recognized as an internal or external command,\n"
"operable program or batch file.\n"
system("\"%WINDIR%/system32/find.exe BFI3CHL671\" input.txt > out.txt 2>err.txt").
expected but was
.

This failure is also occurred on Windows 8.

I'm not sure why you think the third case should be true.
Here is patch:
diff --git a/testsystem.rb b/testsystem.rb.new
index b877538..db19a3c 100644
--- a/testsystem.rb
+++ b/test
system.rb.new
@@ -141,7 +141,7 @@ class TestSystem < Test::Unit::TestCase
cmd = "\"%WINDIR%/system32/find.exe\" \"BFI3CHL671\" input.txt > out.txt 2>err.txt"
assertequal(true, system(cmd), message)
cmd = "\"%WINDIR%/system32/find.exe BFI3CHL671\" input.txt > out.txt 2>err.txt"
- assert
equal(true, system(cmd), message)
+ assert_equal(false, system(cmd), message)
end
end
end

#7 Updated by Luis Lavena about 1 year ago

  • Category set to test
  • Status changed from Closed to Assigned
  • Assignee changed from Motohiro KOSAKI to Nobuyoshi Nakada
  • Target version set to 2.0.0
  • % Done changed from 100 to 50

#8 Updated by Nobuyoshi Nakada about 1 year ago

  • Status changed from Assigned to Closed
  • % Done changed from 50 to 100

Also available in: Atom PDF