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: 13719659 X-Patchwork-Delegate: kuba@kernel.org 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 DB47A1B47C2 for ; Tue, 2 Jul 2024 13:28:55 +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=1719926937; cv=none; b=KaPXchDi+oNNG/2K/ot34AwH3NWtXq7KDhSNZQcNSF0hC7tkDIxRd8PuFK5epl9vhcYpXfCqs/t4ma8PR/FRtkGc4eDwLtOmJVjeUUPzxr63Ny6swJdB5O0vM/TV7j1QRXwKCm7X1Nj0nsCUo6z/2dUVQXFU8gCN1bOwQbfJqSg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719926937; c=relaxed/simple; bh=jyZG55KbeIoMjk6imOGduy5VGWOolxy4yZAD40rYJSI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TIHWOTXQnVLmGzMfKbPxJWFk6fhWNrMyL3Bs9JpK7hTVckwqjUEYEDxuMguh2gLXplnh4DfIkkv8en0/+vCNCM6PhbgeWixkuo1m7armYoqGHpVXMCz95OJ+AO1gG7V4VCAue4lntEqJ9g9WfNSZ2m4uY6urpq9HTJsovIN6+xQ= 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=MmT8nAJx; 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="MmT8nAJx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719926934; 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=MmT8nAJx2p/O0JuV77aQqZ4DsoZVXxcpli+7qmXtw8PLl2Ee5HzNHXi0IFq+AZwOTHoobZ Au3tLIiArtnOIIL6p+gaYD0VuEmh/O1nVaKgbNoIyNuljy5zAP+QB/Cs3UBkaGLZWka40X clEA26NaiPWuRl6kSp364C/bSH1bUzk= 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Patchwork-Delegate: kuba@kernel.org 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: 13719660 X-Patchwork-Delegate: kuba@kernel.org 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 8E1171B4C41 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=1719926949; cv=none; b=ZCrgfyzXUWktwdDlG8Nf4cnvhUKcGFDi3HtAQ3SyxBM3r/EVqYw9FDSd/jybf62T8zKBAQBYS6yQ4T5/njoNFrMk4eGMA92fTLeTiHAy+LMi+wnF7VWpUJH9WK6lbFd3jjrhVT+52k3BtLH32M/euFZOmED9nPT/5HBCK2sSM2E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719926949; c=relaxed/simple; bh=vdM8sZkQ1/QCM3o5+eJ6BqO8/kIs8asupZPXbVvaeuM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hUqx5Pp1FzIndQBkBFvW5bVaTEZC17lb38vcdM7VjO4rXnyY4kJOFWfcHqh0C35nbSRRUhQcqS1i790vaCj/UJ5TQZi2jGvVXPtWWFEtn/TIgauSEpYDlHhmJTAXDv+oZwmEQywgVCl/WlV2rf22JaWXw96hibMU0S1GM2p+Jn8= 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Patchwork-Delegate: kuba@kernel.org 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: 13719661 X-Patchwork-Delegate: kuba@kernel.org 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 D22DC1B4C5D 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=1719926955; cv=none; b=DaO7hqltEgeuDdXD7s5J8+M3ZOVypz1BU9r9T6O4flKFZEXlycAPCU0klMdkOl3yjkBfZSvzjtqbjZWWgherfbtJaTXTPl/3L799IITViDYKk71bFG16xugOFdiwuvjT8+Icnc5YezZDeW8lNBgU5IsK+zdpxGaPSvv6B/JrkJc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719926955; c=relaxed/simple; bh=Md4OIEI8Xk4k+u3H0ICjhfnaCqEai/wBrcFngDWAWZg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UQRsyrURer+ZuypZ3T88/0//0xOp4MAHotAWzxDJOXJN9pYZi/+tO7OW8oYk+VCvaVGZrC5jY63C+f2HN7QWc0I5Z0YwXbXwU3sJX9UIhRQIdHORrFzWpJAHQY2f0uNe2RJ9dfRwVhNnUxZHxmrD6M4H+ShB/USfPia08714pHM= 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Patchwork-Delegate: kuba@kernel.org 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