On 6/26/26 4:49 PM, Nirmoy Das wrote:
> loopy_wait() expects millisecond timestamps. However, Ubuntu Resolute
> can use uutils date, where `date -u +%s%3N` returns seconds plus full
> nanoseconds instead of a 3-digit millisecond field. This makes
> busywait expire too early and can make vlan_bridge_binding.sh read a
> stale operstate.
> 
> Fixes: 25ae948b4478 ("selftests/net: add lib.sh")
> Cc: [email protected] # 6.8+
> Link: https://github.com/uutils/coreutils/issues/11658
> Signed-off-by: Nirmoy Das <[email protected]>
> ---
>  tools/testing/selftests/net/lib.sh | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/lib.sh 
> b/tools/testing/selftests/net/lib.sh
> index b40694573f4c7..fcaec058be6d0 100644
> --- a/tools/testing/selftests/net/lib.sh
> +++ b/tools/testing/selftests/net/lib.sh
> @@ -70,12 +70,27 @@ ksft_exit_status_merge()
>               $ksft_xfail $ksft_pass $ksft_skip $ksft_fail
>  }
>  
> +timestamp_ms()
> +{
> +     local now=$(date -u +%s:%N)

shellcheck says:

 ^-^ SC2155 (warning): Declare and assign separately to avoid masking
return values.

/P


Reply via email to