Skip to content

Commit

Permalink
selftests/net: so_txtime: fix parsing of start time stamp on 32 bit s…
Browse files Browse the repository at this point in the history
…ystems

This patch fixes the parsing of the cmd line supplied start time on 32
bit systems. A "long" on 32 bit systems is only 32 bit wide and cannot
hold a timestamp in nano second resolution.

Fixes: 0408063 ("selftests/net: so_txtime multi-host support")
Cc: Carlos Llamas <cmllamas@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20220502094638.1921702-2-mkl@pengutronix.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
marckleinebudde authored and Paolo Abeni committed May 3, 2022
1 parent 3122257 commit 97926d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/so_txtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ static void parse_opts(int argc, char **argv)
cfg_rx = true;
break;
case 't':
cfg_start_time_ns = strtol(optarg, NULL, 0);
cfg_start_time_ns = strtoll(optarg, NULL, 0);
break;
case 'm':
cfg_mark = strtol(optarg, NULL, 0);
Expand Down

0 comments on commit 97926d5

Please sign in to comment.