United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7079012 test/java/net/NetworkInterface/NetParamsTest.java fails with SocketException getting mac address
7079012 : test/java/net/NetworkInterface/NetParamsTest.java fails with SocketException getting mac address

Details
Type:
Bug
Submit Date:
2011-08-14
Status:
Closed
Updated Date:
2012-10-19
Project Name:
JDK
Resolved Date:
2011-10-04
Component:
core-libs
OS:
generic
Sub-Component:
java.net
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:
8

Related Reports
Backport:

Sub Tasks

Description
This test was fixed recently by 7076523 to fix an NPE when running in Solaris 10. Here's another one (this duplicates on sc11b1901.us.oracle.com).

--------------------------------------------------
TEST: java/net/NetworkInterface/NetParamsTest.java
JDK under test: (/tmp/jprt/T1/091042.ab23780/testproduct/solaris_sparcv9_5.10-product)
java version "1.8.0-internal"
Java(TM) SE Runtime Environment (build 1.8.0-internal-201108140910.ab23780.tl-b00)
OpenJDK 64-Bit Server VM (build 22.0-b01, mixed mode)

ACTION: build -- Passed. Build successful
REASON: Named class compiled on demand
TIME:   0.026 seconds
messages:
command: build NetParamsTest
reason: Named class compiled on demand
elapsed time (seconds): 0.026

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.025 seconds
messages:
command: compile /tmp/jprt/T1/091042.ab23780/source/jdk/test/java/net/NetworkInterface/NetParamsTest.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.025

ACTION: main -- Failed. Execution failed: `main' threw exception: java.net.SocketException: Invalid argument
REASON: Assumed action based on file name: run main NetParamsTest 
TIME:   0.005 seconds
messages:
command: main NetParamsTest
reason: Assumed action based on file name: run main NetParamsTest 
elapsed time (seconds): 0.005
STDOUT:
sppp0 : 
	Status:  UP
STDERR:
java.net.SocketException: Invalid argument
	at java.net.NetworkInterface.getMacAddr0(Native Method)
	at java.net.NetworkInterface.getHardwareAddress(NetworkInterface.java:440)
	at NetParamsTest.printIF(NetParamsTest.java:36)
	at NetParamsTest.main(NetParamsTest.java:71)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:473)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:680)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.net.SocketException
JavaTest Message: shutting down test


TEST RESULT: Failed. Execution failed: `main' threw exception: java.net.SocketException: Invalid argument
--------------------------------------------------

                                    

Comments
Changeset(http://hg.openjdk.java.net/jdk8/tl/jdk/rev/61a8c602cace) reviewed, the reg test has been moved out from problem list and never failed after b28, close as verified.
                                     
2012-10-19
EVALUATION

remove specific check for ENXIO and just return -1 for all errors
from ioctl() getting MAC address. 

Also add new support for SIOCGLIFHWADDR ioctl on S11
                                     
2011-09-21



Hardware and Software, Engineered to Work Together