summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-25 17:15:05 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-25 17:15:05 +0000
commit0dddb4b32895e46c31bbad363bafc5a5bfcd7c45 (patch)
treedc7c644675bc780d987e718ee6aee37ade23c68b
parent57408cb1d1c56a85ff72e6cc192e72d37cfbbe7e (diff)
* test/ruby/test_io.rb (test_ioctl_linux): skip if a platform is
not x86 because linux ioctl request number depend on cpu arch. At least, alpha, mips, sparc and ppc have a different number. [Bug #7718] [ruby-core:51544] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--test/ruby/test_io.rb5
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 038d1372a71..574b64c4431 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Jan 26 01:12:23 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * test/ruby/test_io.rb (test_ioctl_linux): skip if a platform is
+ not x86 because linux ioctl request number depend on cpu arch.
+ At least, alpha, mips, sparc and ppc have a different number.
+ [Bug #7718] [ruby-core:51544]
+
Fri Jan 25 19:14:24 2013 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* ext/win32ole/win32ole.c: use TlsAlloc instead of __declspec(thread)
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 0b3b5591e35..451f6c246d2 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -2439,11 +2439,14 @@ End
def test_ioctl_linux
return if /linux/ !~ RUBY_PLATFORM
+ # Alpha, mips, sparc and ppc have an another ioctl request number scheme.
+ # So, hardcoded 0x80045200 may fail.
+ return if /^i.?86|^x86_64/ !~ RUBY_PLATFORM
assert_nothing_raised do
File.open('/dev/urandom'){|f1|
entropy_count = ""
- # get entropy count
+ # RNDGETENTCNT(0x80045200) mean "get entropy count".
f1.ioctl(0x80045200, entropy_count)
}
end