Re: [DTrace-devel] [PATCH] test/utils: add more reliable "get remote address" approach

Eugene Loh
2025-07-03T17:06:22Z

On 7/3/25 12:59, Alan Maguire wrote:

> On 03/07/2025 17:43, Eugene Loh wrote:
>
>> I tested and it looks good (modulo the OL8 UEK6 issue mentioned in the
>> patch 3/4 feedback).
>>
> Sorry I couldn't find that issue; is this the 5.15 problem with the ip
> send probes?

dtrace: failed to compile script /dev/stdin:
".../build/dlibs/5.2/tcp.d", line 177: failed to resolve type of
inet_ntoa arg#1 (ipaddr_t *):
Unknown type name

>> On 7/3/25 07:33, Alan Maguire via DTrace-devel wrote:
>>
>>> The current approach of looking for remote addresses
>>> is brittle and fails in many environments; it checks the
>>> default route gateway and looks for open ports in the TCP
>>> case.
>>>
>>> We can however achieve the same goal reliably by creating
>>> a network namespace on the system and configuring either
>>> IPv4 or IPv6 addresses on the namespaced and local veth
>>> interfaces that support communication between namespaces.
>>> If a tcp port is required start sshd to listen on that port.
>> Maybe a comma after "required"?
>>
> yep, will fix.
>
>>> Teardown is managed in runtest.sh as signal handling for
>>> timeouts within the test scripts is not working; a trap
>>> function does not trigger for TERM.
>> I'm having trouble parsing the text before the semicolon.  I think I
>> understand it, but cannot seem to figure out the grammar.
> I'll try and rephrase; basically I tried adding a
>
> trap cleanup TERM
>
> to the test script to catch a SIGTERM when the test timed out;
> unfortunately this didn't trigger when tests timed out so we were left
> with network namespaces hanging around.
>
> How about
>
> Teardown of network namespaces is managed in the toplevel runtest.sh to
> ensure that network namespaces are removed after test completion for all
> cases; success, failure and timeout.

Great.  Or how about a colon instead of semicolon?