RFR 8047031: Need new tests to check socket permission
Amanda Jiang
amanda.jiang at oracle.com
Fri Aug 29 18:39:51 UTC 2014
Hi Chris,
Thanks for reviewing this test.
I have upgraded the test by your suggestions, in the new version, free
port is generated first then socket permission instances are created
dynamically. Lambda and TestNG are also applied for simplifying tests
and reducing redundant codes.
Please check the webrev below:
http://cr.openjdk.java.net/~tyan/amandaj/8047031/webrev00/
Thanks,
Amanda
On 8/27/14 10:45 AM, Chris Hegarty wrote:
> 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