-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File.stat gives incorrect mode value on PPC platforms #2600
Comments
Tested jruby version is 1.7.19 as well as 1.7.0 |
Can you try a build of JRuby 1.7.20 or JRuby 9k.pre2 (or HEAD of either branch)? We've recently updated our PPC64 support for native features, and it's possible this is working now. |
Optimistically marking as fixed, since we added PPC64 support recently and the old pure-Java version was likely to cause for bogus stat results. |
Downloaded 1.7.20 build from https://oss.sonatype.org/content/repositories/snapshots/org/jruby/jruby-complete/1.7.20-SNAPSHOT/ testuser@testmachine:~> ls -ltr testuser@testmachine:~> java -showversion -jar jruby-complete-1.7.20-20150304.132514-1.jar -e 'p File.stat("file.txt")' Mar 14, 2015 3:23:26 AM jnr.ffi.provider.jffi.NativeRuntime buildNativeTypeAliases |
<File::Stat dev=0x, ino=0, mode=0100644, nlink=, uid=-1, gid=, rdev=0x, size=0, blksize=4096, blocks=, atime=2015-03-14 02:59:53 +0000, mtime=2015-03-14 02:59:53 +0000, ctime=2015-03-14 03:20:13 +0000> |
File::Stat dev=0x, ino=0, mode=0100644, nlink=, uid=-1, gid=, rdev=0x, size=0, blksize=4096, etc... |
Step1 : Create a file with permission set as 6xx. For example, 611 as below.
[testuser@linux4 test]$ touch file.txt
[testuser@linux4 test]$ chmod 611 file.txt
[testuser@linux4 test]$ ls -ltr
total 13096
-rw-r--r-- 1 testuser testuser 13406573 Feb 16 12:29 jruby.jar
-rw---x--x 1 testuser testuser 0 Feb 16 12:29 file.txt
Step2 : Get file permission using File.stat as below.
[testuser@linux4 test]$ java -showversion -jar jruby.jar -e 'p File.stat("file.txt")'
java version "1.7.0"
Java(TM) SE Runtime Environment (build pxp6470sr9-20150209_05(SR9))
IBM J9 VM (build 2.6, JRE 1.7.0 Linux ppc64-64 Compressed References 20150206_234339 (JIT enabled, AOT enabled)
J9VM - R26_jvm.26_20150206_0405_B234339
JIT - r11_20150206_1213_foreman
GC - R26_jvm.26_20150206_0405_B234339_CMPRSS
J9CL - 20150206_234339)
JCL - 20150112_01 based on Oracle 7u75-b12
File::Stat dev=0x, ino=0, mode=0100644, nlink=, uid=-1, gid=, rdev=0x, size=0, blksize=4096, blocks=, atime=2015-02-16 12:29:30 +0530, mtime=2015-02-16 12:29:30 +0530, ctime=2015-02-16 12:29:30 +0530
Note: Modes are getting displayed correctly on Linux AMD and IA32 platforms.
The text was updated successfully, but these errors were encountered: