Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vsock/test: Use NSEC_PER_SEC

Replace 1000000000ULL with NSEC_PER_SEC.

No functional change intended.

Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Link: https://patch.msgid.link/20241219-test-vsock-leaks-v4-1-a416e554d9d7@rbox.co
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Michal Luczaj and committed by
Jakub Kicinski
f3af3ba1 aa4ad7c3

+3 -2
+3 -2
tools/testing/vsock/vsock_test.c
··· 22 22 #include <signal.h> 23 23 #include <sys/ioctl.h> 24 24 #include <linux/sockios.h> 25 + #include <linux/time64.h> 25 26 26 27 #include "vsock_test_zerocopy.h" 27 28 #include "timeout.h" ··· 560 559 exit(EXIT_FAILURE); 561 560 } 562 561 563 - return (ts.tv_sec * 1000000000ULL) + ts.tv_nsec; 562 + return (ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec; 564 563 } 565 564 566 565 #define RCVTIMEO_TIMEOUT_SEC 1 ··· 600 599 } 601 600 602 601 read_overhead_ns = current_nsec() - read_enter_ns - 603 - 1000000000ULL * RCVTIMEO_TIMEOUT_SEC; 602 + NSEC_PER_SEC * RCVTIMEO_TIMEOUT_SEC; 604 603 605 604 if (read_overhead_ns > READ_OVERHEAD_NSEC) { 606 605 fprintf(stderr,