summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/txtimestamp.c
AgeCommit message (Collapse)AuthorFilesLines
2022-03-22selftests: net: change fprintf format specifiersGuo Zhengkui1-3/+3
`cur64`, `start64` and `ts_delta` are int64_t. Change format specifiers in fprintf from `"%lu"` to `"%" PRId64` to adapt to 32-bit and 64-bit systems. Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com> Link: https://lore.kernel.org/r/20220319073730.5235-1-guozhengkui@vivo.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-02-05selftests: txtimestamp: fix compilation issueVadim Fedorenko1-3/+3
PACKET_TX_TIMESTAMP is defined in if_packet.h but it is not included in test. Include it instead of <netpacket/packet.h> otherwise the error of redefinition arrives. Also fix the compiler warning about ambiguous control flow by adding explicit braces. Fixes: 8fe2f761cae9 ("net-timestamp: expand documentation") Suggested-by: Willem de Bruijn <willemdebruijn.kernel@gmail.com> Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru> Acked-by: Willem de Bruijn <willemb@google.com> Link: https://lore.kernel.org/r/1612461034-24524-1-git-send-email-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-07-31selftests: txtimestamp: add flag for timestamp validation tolerance.Jian Yang1-2/+8
The txtimestamp selftest sets a fixed 500us tolerance. This value was arrived at experimentally. Some platforms have higher variances. Make this adjustable by adding the following flag: -t N: tolerance (usec) for timestamp validation. Signed-off-by: Jian Yang <jianyang@google.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-03-30selftests: move timestamping selftests to net folderJian Yang1-0/+916
For historical reasons, there are several timestamping selftest targets in selftests/networking/timestamping. Move them to the standard directory for networking tests: selftests/net. Signed-off-by: Jian Yang <jianyang@google.com> Acked-by: Willem de Bruijn <willemb@google.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>