From patchwork Tue Jul 2 13:28:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 13719655 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC2E9186E4E for ; Tue, 2 Jul 2024 13:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719926936; cv=none; b=dB6Pc/rP1lpsmhAEOzdPdoh6tkNvzZjpEvXqmUMhp+nzaIOen7sRvzpqqFQtUBVWR+PZ04yDHZj6UzRcdf3xSQ9IA3Ztnu5pfDECDVXvV47RNlUhy576lEcmmHZBP0IxhuNel5ZheC/n5e40w1od4EtZVwm89vKAdj9Dppg1qb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719926936; c=relaxed/simple; bh=jyZG55KbeIoMjk6imOGduy5VGWOolxy4yZAD40rYJSI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kNMgsGHw3RbUKLcKA/LIAluWF/6CeTOF8Z4YWip/Yj7SRpZQwn2CBaUnr7Pihg6mgE5ZKdG/le6mAV0UB5h61A/9Eo7tEnxS1PVrvFMHYbf420rya+IAPAmvbCb/5sAt48DMlVeOjQuPwvA7eRyWjC4f9vVLSTGDIbh9CbZlS9Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PHL6HdF6; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PHL6HdF6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719926933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+jl2z9/pX2zCRMT6h5qbae+biJ++Up1G2LDt2lVB89I=; b=PHL6HdF6DdlLamY7BEc+qPPBCDoovtj9KqEsng1hrJzpntb+2EHZaVfUMkXxuERqrWIaHy t4ImSAxda9UF4ppm/5PrKUvIkS8mdW/UeQj+miPrNG3qXVUnqDqpG7UFO0XZ8AFhQJz6l6 3ZL1UgXBm0oyp2T/FxS8aaZ1FaAmmRs= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-4CUHkCvhOzucYTBx6Br-kQ-1; Tue, 02 Jul 2024 09:28:48 -0400 X-MC-Unique: 4CUHkCvhOzucYTBx6Br-kQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0DC611933182; Tue, 2 Jul 2024 13:28:47 +0000 (UTC) Received: from RHTRH0061144.bos.redhat.com (dhcp-17-72.bos.redhat.com [10.18.17.72]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4DCE319560AE; Tue, 2 Jul 2024 13:28:34 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: dev@openvswitch.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Pravin B Shelar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , =?utf-8?q?Adri=C3=A1n_Moreno?= , Simon Horman Subject: [PATCH net-next 1/3] selftests: openvswitch: Bump timeout to 15 minutes. Date: Tue, 2 Jul 2024 09:28:28 -0400 Message-ID: <20240702132830.213384-2-aconole@redhat.com> In-Reply-To: <20240702132830.213384-1-aconole@redhat.com> References: <20240702132830.213384-1-aconole@redhat.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 We found that since some tests rely on the TCP SYN timeouts to cause flow misses, the default test suite timeout of 45 seconds is quick to be exceeded. Bump the timeout to 15 minutes. Signed-off-by: Aaron Conole Reviewed-by: Simon Horman Tested-by: Simon Horman --- tools/testing/selftests/net/openvswitch/settings | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/testing/selftests/net/openvswitch/settings diff --git a/tools/testing/selftests/net/openvswitch/settings b/tools/testing/selftests/net/openvswitch/settings new file mode 100644 index 000000000000..e2206265f67c --- /dev/null +++ b/tools/testing/selftests/net/openvswitch/settings @@ -0,0 +1 @@ +timeout=900 From patchwork Tue Jul 2 13:28:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 13719656 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AE972AF16 for ; Tue, 2 Jul 2024 13:29:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719926948; cv=none; b=AIYmTSG39NeaoU4AWGUrcE4E8sZ6SMHfYcU6rK6g1ap3AY76Xaxo4rzm81hneh30epoAwqpPxsUuZv0YFo6d2+AqShsSqLVePML1Kw7u0f/St702XRP+BR1sxIZPFNnb/NLdprBqADUtEEfyWoG1hQoVr4bfxJ2f0feOp9OdLyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719926948; c=relaxed/simple; bh=vdM8sZkQ1/QCM3o5+eJ6BqO8/kIs8asupZPXbVvaeuM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YpQOIl1txBt2soyN/Y6zRxmxYPOq5U4GxJ+c9zEGBuyErR4o+R97rBZWQ7FQH5QMAX8Akz6zWA9+ZEJ5xD+OPFxpV5/U34ew3gAXWjQe7L1Hwk8YkkMk6wMojQ1vQBoYf3HP2o3/RHhTpOfvsUjg25NVrU8kDH7gWLFM23gne/4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=B0uzJE9j; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="B0uzJE9j" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719926946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UOWKcdh5zgVSTo5qmONcjJuIiMRK3wxQZInmWAhHTq4=; b=B0uzJE9jmem7SOmfRH0+z6esbJfuPxlxFq7E9h9M6zkyaFbr0sbN+E0q1UFkZVkUPb3x4N QtWtbtPsJ/koAF/Zlb8KP3wJekQ70SxQLW8VkSG5b5XkES1WGiCCr3JdMDr98u+GllMl2/ tankKHikxigo8b6b5BLSyy9wpnR64oU= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-B-vC6Z_XMeyxnPyy2CU6yg-1; Tue, 02 Jul 2024 09:29:03 -0400 X-MC-Unique: B-vC6Z_XMeyxnPyy2CU6yg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B2B901937222; Tue, 2 Jul 2024 13:28:49 +0000 (UTC) Received: from RHTRH0061144.bos.redhat.com (dhcp-17-72.bos.redhat.com [10.18.17.72]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C4A7019837F6; Tue, 2 Jul 2024 13:28:36 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: dev@openvswitch.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Pravin B Shelar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , =?utf-8?q?Adri=C3=A1n_Moreno?= , Simon Horman Subject: [PATCH net-next 2/3] selftests: openvswitch: Attempt to autoload module. Date: Tue, 2 Jul 2024 09:28:29 -0400 Message-ID: <20240702132830.213384-3-aconole@redhat.com> In-Reply-To: <20240702132830.213384-1-aconole@redhat.com> References: <20240702132830.213384-1-aconole@redhat.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Previously, the openvswitch.sh test suites would not attempt to autoload the openvswitch module. The idea was that a user who is manually running tests might not even have the OVS module loaded or configured for their own development. However, if the kernel module is configured, and the module can be autoloaded then we should just attempt to load it and run the tests. This is especially true in the CI environments, where the CI tests should be able to rely on auto loading to get the test suite running. Signed-off-by: Aaron Conole Reviewed-by: Simon Horman Tested-by: Simon Horman --- .../selftests/net/openvswitch/openvswitch.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh index 15bca0708717..0bd0425848d9 100755 --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh @@ -613,16 +613,20 @@ run_test() { tname="$1" tdesc="$2" - if ! lsmod | grep openvswitch >/dev/null 2>&1; then - stdbuf -o0 printf "TEST: %-60s [NOMOD]\n" "${tdesc}" - return $ksft_skip - fi - if python3 ovs-dpctl.py -h 2>&1 | \ grep -E "Need to (install|upgrade) the python" >/dev/null 2>&1; then stdbuf -o0 printf "TEST: %-60s [PYLIB]\n" "${tdesc}" return $ksft_skip fi + + python3 ovs-dpctl.py show >/dev/null 2>&1 || \ + echo "[DPCTL] show exception." + + if ! lsmod | grep openvswitch >/dev/null 2>&1; then + stdbuf -o0 printf "TEST: %-60s [NOMOD]\n" "${tdesc}" + return $ksft_skip + fi + printf "TEST: %-60s [START]\n" "${tname}" unset IFS From patchwork Tue Jul 2 13:28:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 13719657 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D2B41B5800 for ; Tue, 2 Jul 2024 13:29:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719926954; cv=none; b=rQjV4V0fnxCatDOtMbvtE9yreB7AekGLwjY0iijibO+65EzTkEagnSYWyQ81G6HVvZqVN+m+bvWtTr998hmB0hfjObPr+F4+TrhDnmeZhVoBvXAQa0iB1iex0U1qQuOSrQA9PrUG/r6Lxfnqkmjf++1Jc5emgLAnqSbyt3TsA0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719926954; c=relaxed/simple; bh=Md4OIEI8Xk4k+u3H0ICjhfnaCqEai/wBrcFngDWAWZg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n0//RL2CvLsf4SXoaoM62+hbVmT6Pyf66W236Wx8hKdvOoHhJP+90zhoGuomyciTyOGFh2yvEVVofctog+CBqpjW92pjGjAjoywGkLQ35lREpY2VnCVIWSv8qI30RaOcYggtIU06kV17JOrvNVP2CXHJbNGGFgLWxIJdn/V65ss= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=hqt3CBra; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hqt3CBra" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719926952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=giGzfHbFvw5ELOoh3gsT5u4QyGdGlB0ujxo9yyHMwqU=; b=hqt3CBraueW6fXv5G6WfvDsvcF/EkHCopaEs7c+5+EupvJKHbKbqqZwrWH+7iwkt9yRjAC Gj+ZmuYfLyoC/S4QY7kGxJLkIQrpgJI8gCZiZwyU5bJX6UbzB7Wy4yLgRVdYFdd9i1J47M F1K1OqHL/ZZCgxcSYgVI1zUL/+pHvHI= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-567-THrynPfCOsqyX_eyscvuzw-1; Tue, 02 Jul 2024 09:29:08 -0400 X-MC-Unique: THrynPfCOsqyX_eyscvuzw-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 981261944DEC; Tue, 2 Jul 2024 13:29:06 +0000 (UTC) Received: from RHTRH0061144.bos.redhat.com (dhcp-17-72.bos.redhat.com [10.18.17.72]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6737019815C1; Tue, 2 Jul 2024 13:28:49 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: dev@openvswitch.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Pravin B Shelar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , =?utf-8?q?Adri=C3=A1n_Moreno?= , Simon Horman Subject: [PATCH net-next 3/3] selftests: openvswitch: Be more verbose with selftest debugging. Date: Tue, 2 Jul 2024 09:28:30 -0400 Message-ID: <20240702132830.213384-4-aconole@redhat.com> In-Reply-To: <20240702132830.213384-1-aconole@redhat.com> References: <20240702132830.213384-1-aconole@redhat.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 The openvswitch selftest is difficult to debug for anyone that isn't directly familiar with the openvswitch module and the specifics of the test cases. Many times when something fails, the debug log will be sparsely populated and it takes some time to understand where a failure occured. Increase the amount of details logged to the debug log by trapping all 'info' logs, and all 'ovs_sbx' commands. Signed-off-by: Aaron Conole Reviewed-by: Simon Horman --- NOTE: There is a conflict here with a patch on list that adds psample support, but it should be simple to resolve, since the conflict would be due to a context change in tests="". I can also respin if the patches collide. tools/testing/selftests/net/openvswitch/openvswitch.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh index 0bd0425848d9..531951086d9c 100755 --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh @@ -23,7 +23,9 @@ tests=" drop_reason drop: test drop reasons are emitted" info() { - [ $VERBOSE = 0 ] || echo $* + [ "${ovs_dir}" != "" ] && + echo "`date +"[%m-%d %H:%M:%S]"` $*" >> ${ovs_dir}/debug.log + [ $VERBOSE = 0 ] || echo $* } ovs_base=`pwd` @@ -65,7 +67,8 @@ ovs_setenv() { ovs_sbx() { if test "X$2" != X; then - (ovs_setenv $1; shift; "$@" >> ${ovs_dir}/debug.log) + (ovs_setenv $1; shift; + info "run cmd: $@"; "$@" >> ${ovs_dir}/debug.log) else ovs_setenv $1 fi @@ -139,7 +142,7 @@ ovs_add_flow () { info "Adding flow to DP: sbx:$1 br:$2 flow:$3 act:$4" ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py add-flow "$2" "$3" "$4" if [ $? -ne 0 ]; then - echo "Flow [ $3 : $4 ] failed" >> ${ovs_dir}/debug.log + info "Flow [ $3 : $4 ] failed" return 1 fi return 0