lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b99004ea-cd9d-bec3-5f9f-82dcb00a6284@gmail.com>
Date:   Tue, 4 Aug 2020 17:54:18 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Colin King <colin.king@...onical.com>,
        "David S . Miller" <davem@...emloft.net>,
        Shuah Khan <shuah@...nel.org>, netdev@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests/net: skip msg_zerocopy test if we have less
 than 4 CPUs



On 8/4/20 5:30 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> The current test will exit with a failure if it cannot set affinity on
> specific CPUs which is problematic when running this on single CPU
> systems. Add a check for the number of CPUs and skip the test if
> the CPU requirement is not met.
> 
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  tools/testing/selftests/net/msg_zerocopy.sh | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/msg_zerocopy.sh b/tools/testing/selftests/net/msg_zerocopy.sh
> index 825ffec85cea..97bc527e1297 100755
> --- a/tools/testing/selftests/net/msg_zerocopy.sh
> +++ b/tools/testing/selftests/net/msg_zerocopy.sh
> @@ -21,6 +21,11 @@ readonly DADDR6='fd::2'
>  
>  readonly path_sysctl_mem="net.core.optmem_max"
>  
> +if [[ $(nproc) -lt 4 ]]; then
> +	echo "SKIP: test requires at least 4 CPUs"
> +	exit 4
> +fi
> +
>  # No arguments: automated test
>  if [[ "$#" -eq "0" ]]; then
>  	$0 4 tcp -t 1
> 

Test explicitly uses CPU 2 and 3, right ?

nproc could be 500, yet cpu 2 or 3 could be offline

# cat /sys/devices/system/cpu/cpu3/online
0
# echo $(nproc)
71

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ