java/nio/file/attribute/PosixFileAttributeView/Basic.java has started to fail recently on two Ubuntu 18.04 aarch64 systems at SAP. An example failure is: -- Lookup UserPrincipal Tests -- lookup: jvmtests lookup group: kmem lookup: scumbag99 ----------System.err:(17/1126)---------- java.io.IOException: scumbag99: Operation not permitted at java.base/sun.nio.fs.UnixUserPrincipals.lookupName(UnixUserPrincipals.java:148) at java.base/sun.nio.fs.UnixUserPrincipals.lookupUser(UnixUserPrincipals.java:170) at java.base/sun.nio.fs.UnixFileSystem$LookupService$1.lookupPrincipalByName(UnixFileSystem.java:328) at Basic.lookupPrincipalTests(Basic.java:305) at Basic.main(Basic.java:390) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) at java.base/java.lang.Thread.run(Thread.java:834) JavaTest Message: Test threw exception: java.io.IOException: scumbag99: Operation not permitted It appears that that getpwnam_r and getgrnam_r are failing with the error EPERM when these libc functions are called to lookup user or group names that do not exist. As per man page of getpwnam_r, EPERM is a well defined error code that should indicate that "The given name or uid was not found." https://linux.die.net/man/3/getpwnam_r Errors 0 or ENOENT or ESRCH or EBADF or EPERM or ... The given name or uid was not found. I suggest to add EBADF and EPERM to the checked return codes in UnixNativeDispatcher.c
|