[PATCH v3 3/4] tests/sockopt-timestamp: Don't test old timestamps if unsupported
Dmitry V. Levin
ldv at altlinux.org
Sun Mar 15 16:35:00 UTC 2020
On Fri, Mar 06, 2020 at 06:22:22PM -0800, Alistair Francis wrote:
> On new 32-bit architectures (like RV32) the kernel defines SO_TIMESTAMP
> to SO_TIMESTAMP_NEW (see include/uapi/asm-generic/socket.h:133).
> Although SO_TIMESTAMP_OLD still exists it returns data that doesn't fit
> into the struct timeval as the old timestamp isn't 64-bit (y2038 safe).
> To fix this let's skip the test cases if SO_TIMESTAMP is the same as
> SO_TIMESTAMP_NEW. Unfortunately as SO_TIMESTAMP is defined with a one
> line if statement (? :) we can't use preprocess defines and instead need
> to just skipt the tests.
Sorry, did you say that rv32 kernel can send SO_TIMESTAMP_OLD (and also
SO_TIMESTAMPNS_OLD with SO_TIMESTAMPING_OLD) control messages containing
32-bit time_t, in contradiction with remaining rv32 types where time_t
This would be so ridiculous for a new architecture that I cannot believe
rv32 kernel behaves this way.
More information about the Strace-devel