RFR 8047031: Need new tests to check socket permission

Chris Hegarty chris.hegarty at oracle.com
Wed Aug 27 15:45:08 UTC 2014


Amanda,

I see you have implemented a getFreePort in this test, and it attempts 
to find a port within a range of 10 of the given port. I would have a 
concern about this when the test is run concurrently. Though we have 
come across similar issues in the past, as the socket permission needs 
to have a defined port range. I'm not sure if we ever came up with a 
good solution.

Do you think it would be possible to get the free port first, and then 
create the socket permission instances dynamically accordingly? Or would 
this make the test very difficult to debug?

-Chris.

On 25/08/14 17:48, Amanda Jiang wrote:
> Hi Michael, Chris and others
>
> We’re working on moving our internal security tests to open idk
> repo(Include refactoring effort). Could you please help to review these
> tests?
>
> Thanks,
> Amanda
>
> On 7/28/14 5:25 PM, Amanda Jiang wrote:
>> Hi All,
>>
>> Could you please review 1 new test to be added for SocketPermission.
>> New test is added to check socket permissions, for instance -
>> - java.net.SocketPermission with "connect", "resolve", "accept", "listen"
>> with Socket, DatagramSocket, MulticastSocket etc.
>>
>> JDK Issue: https://bugs.openjdk.java.net/browse/JDK-8047031
>> WebRev: http://cr.openjdk.java.net/~rhalade/8047031/webrev.00/
>>
>> Thanks,
>> Amanda
>>
>>
>


More information about the security-dev mailing list