RFR 8046588: test for SO_FLOW_SLA availability does not check for EACCESS
Alan Bateman
Alan.Bateman at oracle.com
Thu Jun 12 17:47:11 UTC 2014
On 12/06/2014 18:04, Michael McMahon wrote:
> Could I get this change reviewed please?
>
> We need to check if the current process has permission to use the
> SO_FLOW_SLA
> socket option as well as test if the feature is installed.
>
> The problem would cause the new test to fail on Solaris machines with
> S11.2
> unless running with the required privilege.
>
> http://cr.openjdk.java.net/~michaelm/8046588/webrev.1/
>
> This change also needs to be backported to 8u20.
I can see that this helps the tests but I just wonder if this might be
confusing to someone that attempts to use this socket option but forgets
to run with privileges. In that case then then methods such as
Socket#setOption will UnsupportedOperationException whereas throwing
IOException with a somewhat useful message as it does not might be better.
Would it be better to just change the test to handle the access denied
instead?
-Alan.
More information about the net-dev
mailing list