diff options
author | Jason Xing <kernelxing@tencent.com> | 2024-09-05 19:00:35 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-09-10 02:42:28 +0300 |
commit | a7e387375f22a4fd46c8ffcfa395a0ca8c186f9e (patch) | |
tree | de23c9a50e2b295ecf969299b8fac815dc751c45 /lib/argv_split.c | |
parent | bfba7bc8b7c2c100b76edb3a646fdce256392129 (diff) | |
download | linux-a7e387375f22a4fd46c8ffcfa395a0ca8c186f9e.tar.xz |
selftests: return failure when timestamps can't be reported
When I was trying to modify the tx timestamping feature, I found that
running "./txtimestamp -4 -C -L 127.0.0.1" didn't reflect the error:
I succeeded to generate timestamp stored in the skb but later failed
to report it to the userspace (which means failed to put css into cmsg).
It can happen when someone writes buggy codes in __sock_recv_timestamp(),
for example.
After adding the check so that running ./txtimestamp will reflect the
result correctly like this if there is a bug in the reporting phase:
protocol: TCP
payload: 10
server port: 9000
family: INET
test SND
USR: 1725458477 s 667997 us (seq=0, len=0)
Failed to report timestamps
USR: 1725458477 s 718128 us (seq=0, len=0)
Failed to report timestamps
USR: 1725458477 s 768273 us (seq=0, len=0)
Failed to report timestamps
USR: 1725458477 s 818416 us (seq=0, len=0)
Failed to report timestamps
...
In the future, it will help us detect whether the new coming patch has
bugs or not.
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20240905160035.62407-1-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib/argv_split.c')
0 files changed, 0 insertions, 0 deletions