Subject: Re: [PATCH net-next v2 2/2] selftests: txtimestamp: add SCM_TS_OPT_ID test

From: Vadim Fedorenko <[email-masked]>
Date: Sun, 8 Sep 2024 21:04:53 +0100

On 02/09/2024 15:24, Jason Xing wrote:
> On Mon, Sep 2, 2024 at 9:09 PM Vadim Fedorenko <[email-masked]> wrote:
>>
>> Extend txtimestamp udp test to run with fixed tskey using
>> SCM_TS_OPT_ID control message.
>>
>> Reviewed-by: Willem de Bruijn <[email-masked]>
>> Signed-off-by: Vadim Fedorenko <[email-masked]>
> 
> Thanks for adding the combination test !
> 
> Reviewed-by: Jason Xing <[email-masked]>

Apparently, I realised that combination tests had been coded before this
change.

run_test_all() {
   setup
   run_test_tcpudpraw    # setsockopt
   run_test_tcpudpraw -C   # cmsg
   run_test_tcpudpraw -n   # timestamp w/o data
   echo "OK. All tests passed"
}

This function runs tests for TCP/UDP/RAW sockets (defined in
run_test_tcpudpraw) 3 different times - with no extra options,
with CMSG option and with "run_test_tcpudpraw":

run_test_tcpudpraw() {
   local -r args=$@

   run_test_v4v6 ${args}   # tcp
   run_test_v4v6 ${args} -u  # udp
   run_test_v4v6 ${args} -r  # raw
   run_test_v4v6 ${args} -R  # raw (IPPROTO_RAW)
   run_test_v4v6 ${args} -P  # pf_packet
}

So if I add "-o <val>" for UDP and RAW sockets in run_test_tcpudpraw it
will be run with CMSG option too.

I'll remove the "run_test_v4v6 ${args} -u -o 42 -C" from the next
version as it's already covered.