RFR: 7903730: Enhance the agentvm to be tolerant to unexpected connection on the port the Agent listens on for handshake with the AgentServer [v3]
Jaikiran Pai
jpai at openjdk.org
Fri Jun 7 11:52:26 UTC 2024
On Thu, 23 May 2024 13:27:03 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> reduce the scope of the try/catch and fix potential short read() issue
>
> src/share/classes/com/sun/javatest/regtest/agent/AgentServer.java line 68:
>
>> 66: * to complete the communication handshake
>> 67: */
>> 68: public static final byte[] JTREG_AGENT_HANDSHAKE_MAGIC = "jtreg".getBytes(US_ASCII);
>
> I was developing a similar PoC for AgentSevre to Agent connectivity
> I used the pattern "Hello Agent:" + id
> using the Agent id in the connection string, which the Agent compared with its own id as a condition of "accepting" the AgentServer connection
I had given that a thought too - the random handshake bytes that I note in a previous comment of mine https://github.com/openjdk/jtreg/pull/195#issuecomment-2121551694 is a variant of this approach where each `AgentServer` process handshakes with the `Agent` using a different handshake data. For reasons I state in that other comment, I felt that using a dynamic handshake value isn't adding much value and so decided to use a static handshake value instead.
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/195#discussion_r1631089031
More information about the jtreg-dev
mailing list