Forum: Ruby-core [ruby-trunk - Bug #7718][Open] test_ioctl_linux fails on PPC and PPC64

Posted by Vít Ondruch (vo_x)
on 2013-01-21 14:32
(Received via mailing list)
Issue #7718 has been reported by vo.x (Vit Ondruch).

----------------------------------------
Bug #7718: test_ioctl_linux fails on PPC and PPC64
https://bugs.ruby-lang.org/issues/7718

Author: vo.x (Vit Ondruch)
Status: Open
Priority: Normal
Assignee: kosaki (Motohiro KOSAKI)
Category:
Target version:
ruby -v: ruby -v: ruby 2.0.0dev (2013-01-16 trunk 38848) [powerpc-linux] 
and ruby 1.9.3p362 (2012-12-25 revision 38607) [powerpc64-linux]


=begin
 test_ioctl_linux(TestIO) 
[/builddir/build/BUILD/ruby-2.0.0-r38848/test/ruby/test_io.rb:2443]:
 Exception raised:
 <#<Errno::EINVAL: Invalid argument - /dev/urandom>>.

The above mentioned test case fails on PPC and PPC64. The test case was 
introduced in 33716. It fails with Ruby 2.0 and Ruby 1.9.3 as well.
=end
Posted by kosaki (Motohiro KOSAKI) (Guest)
on 2013-01-21 16:35
(Received via mailing list)
Issue #7718 has been updated by kosaki (Motohiro KOSAKI).

Status changed from Open to Feedback
Assignee deleted (kosaki (Motohiro KOSAKI))

PPC is not supported platform. so, we need more detailed description why 
the issue was happen.
----------------------------------------
Bug #7718: test_ioctl_linux fails on PPC and PPC64
https://bugs.ruby-lang.org/issues/7718#change-35513

Author: vo.x (Vit Ondruch)
Status: Feedback
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby -v: ruby 2.0.0dev (2013-01-16 trunk 38848) [powerpc-linux] 
and ruby 1.9.3p362 (2012-12-25 revision 38607) [powerpc64-linux]


=begin
 test_ioctl_linux(TestIO) 
[/builddir/build/BUILD/ruby-2.0.0-r38848/test/ruby/test_io.rb:2443]:
 Exception raised:
 <#<Errno::EINVAL: Invalid argument - /dev/urandom>>.

The above mentioned test case fails on PPC and PPC64. The test case was 
introduced in 33716. It fails with Ruby 2.0 and Ruby 1.9.3 as well.
=end
Posted by Vít Ondruch (vo_x)
on 2013-01-21 18:11
(Received via mailing list)
Issue #7718 has been updated by vo.x (Vit Ondruch).


This is the strace output if that might help:

http://paste.fedoraproject.org/2488/
----------------------------------------
Bug #7718: test_ioctl_linux fails on PPC and PPC64
https://bugs.ruby-lang.org/issues/7718#change-35514

Author: vo.x (Vit Ondruch)
Status: Feedback
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby -v: ruby 2.0.0dev (2013-01-16 trunk 38848) [powerpc-linux] 
and ruby 1.9.3p362 (2012-12-25 revision 38607) [powerpc64-linux]


=begin
 test_ioctl_linux(TestIO) 
[/builddir/build/BUILD/ruby-2.0.0-r38848/test/ruby/test_io.rb:2443]:
 Exception raised:
 <#<Errno::EINVAL: Invalid argument - /dev/urandom>>.

The above mentioned test case fails on PPC and PPC64. The test case was 
introduced in 33716. It fails with Ruby 2.0 and Ruby 1.9.3 as well.
=end
Posted by kosaki (Motohiro KOSAKI) (Guest)
on 2013-01-21 18:41
(Received via mailing list)
Issue #7718 has been updated by kosaki (Motohiro KOSAKI).


> ioctl(5, RNDGETENTCNT, 0x1001000bd40)   = -1 EINVAL (Invalid argument)

Weird.
RNDGETENTCNT doesn't have returning EINVAL path.

----------------------------------------
Bug #7718: test_ioctl_linux fails on PPC and PPC64
https://bugs.ruby-lang.org/issues/7718#change-35515

Author: vo.x (Vit Ondruch)
Status: Feedback
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby -v: ruby 2.0.0dev (2013-01-16 trunk 38848) [powerpc-linux] 
and ruby 1.9.3p362 (2012-12-25 revision 38607) [powerpc64-linux]


=begin
 test_ioctl_linux(TestIO) 
[/builddir/build/BUILD/ruby-2.0.0-r38848/test/ruby/test_io.rb:2443]:
 Exception raised:
 <#<Errno::EINVAL: Invalid argument - /dev/urandom>>.

The above mentioned test case fails on PPC and PPC64. The test case was 
introduced in 33716. It fails with Ruby 2.0 and Ruby 1.9.3 as well.
=end
Posted by kosaki (Motohiro KOSAKI) (Guest)
on 2013-01-21 22:46
(Received via mailing list)
Issue #7718 has been updated by kosaki (Motohiro KOSAKI).


Please run following program. I guess alpha, mips, sparc and ppc have 
different RNDGETENTCNT number against x86.

-----------
#include <linux/random.h>

main(){
  printf("%lx\n", RNDGETENTCNT);
}

----------------------------------------
Bug #7718: test_ioctl_linux fails on PPC and PPC64
https://bugs.ruby-lang.org/issues/7718#change-35518

Author: vo.x (Vit Ondruch)
Status: Feedback
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby -v: ruby 2.0.0dev (2013-01-16 trunk 38848) [powerpc-linux] 
and ruby 1.9.3p362 (2012-12-25 revision 38607) [powerpc64-linux]


=begin
 test_ioctl_linux(TestIO) 
[/builddir/build/BUILD/ruby-2.0.0-r38848/test/ruby/test_io.rb:2443]:
 Exception raised:
 <#<Errno::EINVAL: Invalid argument - /dev/urandom>>.

The above mentioned test case fails on PPC and PPC64. The test case was 
introduced in 33716. It fails with Ruby 2.0 and Ruby 1.9.3 as well.
=end
Posted by Vít Ondruch (vo_x)
on 2013-01-22 08:51
(Received via mailing list)
Issue #7718 has been updated by vo.x (Vit Ondruch).


=begin
This is the output:
 # ./a.out
 40045200

And here is my testing IRB session:

 # irb
 irb(main):001:0> File.open('/dev/urandom'){|f1|
 irb(main):002:1*         entropy_count = ""
 irb(main):003:1>         # get entropy count
 irb(main):004:1*         f1.ioctl(0x80045200, entropy_count)
 irb(main):005:1>       }
 Errno::EINVAL: Invalid argument - /dev/urandom
   from (irb):4:in `ioctl'
   from (irb):4:in `block in irb_binding'
   from (irb):1:in `open'
   from (irb):1
   from /usr/bin/irb:12:in `<main>'
 irb(main):006:0> File.open('/dev/urandom'){|f1|
 irb(main):007:1*         entropy_count = ""
 irb(main):008:1>         f1.ioctl(0x40045200, entropy_count)
 irb(main):009:1> }
 => 0
 irb(main):010:0>

And similar script run with strace: http://paste.fedoraproject.org/2489/
=end

----------------------------------------
Bug #7718: test_ioctl_linux fails on PPC and PPC64
https://bugs.ruby-lang.org/issues/7718#change-35523

Author: vo.x (Vit Ondruch)
Status: Feedback
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby -v: ruby 2.0.0dev (2013-01-16 trunk 38848) [powerpc-linux] 
and ruby 1.9.3p362 (2012-12-25 revision 38607) [powerpc64-linux]


=begin
 test_ioctl_linux(TestIO) 
[/builddir/build/BUILD/ruby-2.0.0-r38848/test/ruby/test_io.rb:2443]:
 Exception raised:
 <#<Errno::EINVAL: Invalid argument - /dev/urandom>>.

The above mentioned test case fails on PPC and PPC64. The test case was 
introduced in 33716. It fails with Ruby 2.0 and Ruby 1.9.3 as well.
=end
Posted by ko1 (Koichi Sasada) (Guest)
on 2013-01-25 04:09
(Received via mailing list)
Issue #7718 has been updated by ko1 (Koichi Sasada).

Category set to core
Target version set to 2.0.0


----------------------------------------
Bug #7718: test_ioctl_linux fails on PPC and PPC64
https://bugs.ruby-lang.org/issues/7718#change-35594

Author: vo.x (Vit Ondruch)
Status: Feedback
Priority: Normal
Assignee:
Category: core
Target version: 2.0.0
ruby -v: ruby -v: ruby 2.0.0dev (2013-01-16 trunk 38848) [powerpc-linux] 
and ruby 1.9.3p362 (2012-12-25 revision 38607) [powerpc64-linux]


=begin
 test_ioctl_linux(TestIO) 
[/builddir/build/BUILD/ruby-2.0.0-r38848/test/ruby/test_io.rb:2443]:
 Exception raised:
 <#<Errno::EINVAL: Invalid argument - /dev/urandom>>.

The above mentioned test case fails on PPC and PPC64. The test case was 
introduced in 33716. It fails with Ruby 2.0 and Ruby 1.9.3 as well.
=end
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.