From patchwork Fri Feb 16 15:28:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 13560213 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 5E16012FB1C for ; Fri, 16 Feb 2024 15:28:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097335; cv=none; b=fn1YimrHAHRvj0ESDGxJWYYV3mHaz2hDuhOXtCP4tW7sBpc4hPhUwIX98EY5E9RIsBtjKowZCEvuKjsbeN+8GP7rRCGJiYmpbAtOH7A25qdZ7ok2oKiGisFFUTz8w7eEG3gbvBJiMauZtUtOTXcN8m5HdWvZTvwt+M0zv+AEcfQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097335; c=relaxed/simple; bh=9JtqUD4H+QMoMeLgxYvnHUYwZtJRB62zSin+RRdDwvc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gwi6oGWcW6sVcmTv7XRErt/X61UoMIF3nCg86Do+hZeseKFjsC3PmZhuyJxPvOaeHIw52Cy+YmzvCFrAfHMXA+M62kucS1WwuK//XxKauI33cN8Wd34Rk4RmKxcs0Mt8IMdikPl3Lmc2i+hqNVQIQxyu0th0Ljai4fkZkuuGlTg= 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=FbYC0Z07; arc=none smtp.client-ip=170.10.133.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="FbYC0Z07" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708097332; 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=5ACNwUVfeFIqXfix8WcKxa6n3HPWTuOXlQoqaXBS9js=; b=FbYC0Z07eWtDzJzJVnn4v/l/zdC1ec1jK7shYg/3hzsXAUQS/rd+ehvNKL3JJy/dXmNT8H 4kwNXSIs5poXWeKiv7YTKZsVoIia5CwrTSHwMeADlau/dEuKr5vEh8dOpfOXrR12tth4P6 2wnj9VyyMaaTNM4+/HM1VT87xhgEc0Y= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-498-FPActdkfOUyvmx_vcIPDZQ-1; Fri, 16 Feb 2024 10:28:49 -0500 X-MC-Unique: FPActdkfOUyvmx_vcIPDZQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5A074185A781; Fri, 16 Feb 2024 15:28:48 +0000 (UTC) Received: from RHTPC1VM0NT.lan (unknown [10.22.33.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id D6BD31C06532; Fri, 16 Feb 2024 15:28:47 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Pravin B Shelar , dev@openvswitch.org, Ilya Maximets , Simon Horman , Eelco Chaudron , Shuah Khan , linux-kselftest@vger.kernel.org Subject: [RFC 1/7] selftests: openvswitch: add test case error directories to clean list Date: Fri, 16 Feb 2024 10:28:40 -0500 Message-ID: <20240216152846.1850120-2-aconole@redhat.com> In-Reply-To: <20240216152846.1850120-1-aconole@redhat.com> References: <20240216152846.1850120-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.4.1 on 10.11.54.7 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Normally, the openvswitch selftests don't keep error files around, but if debugging, there is an option to keep these files. The 'clean' target should be informed that they exist to ensure they are deleted properly. Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/openvswitch/Makefile b/tools/testing/selftests/net/openvswitch/Makefile index 2f1508abc826..e6c4a89cc14a 100644 --- a/tools/testing/selftests/net/openvswitch/Makefile +++ b/tools/testing/selftests/net/openvswitch/Makefile @@ -8,6 +8,16 @@ TEST_PROGS := openvswitch.sh TEST_FILES := ovs-dpctl.py -EXTRA_CLEAN := test_netlink_checks +OVS_TESTS := \ + test_arp_ping \ + test_ct_connect_v4 \ + test_connect_v4 \ + test_nat_connect_v4 \ + test_nat_related_v4 \ + test_netlink_checks \ + test_upcall_interfaces \ + test_drop_reason + +EXTRA_CLEAN := $(OVS_TESTS) include ../../lib.mk From patchwork Fri Feb 16 15:28:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 13560212 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 C596012FF80 for ; Fri, 16 Feb 2024 15:28:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097335; cv=none; b=aQIj3EL+YV/vnaG8KIzgbaie+IaUuq0ubInTSJ/KZ//tNyTdNUgZ2ZD66IbdKVa8zLOE3SKYrUXarJGAsl/yztNf2VginWvL3egJp3+mpSgM1OPsDXXY0MiK4JXO1AB39IRoyu9zDRr7Gg2fzydXtYr7sFU6fT+TCvrm4XW79Ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097335; c=relaxed/simple; bh=PIMA86KyXaitvSyuuTjXRvneAlVtthQAw7PLEDbmb0Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k7L1tJwJ2YY31vy5cYT7g5vyXDrUnwT2K8iBguuoamZGfG1JuF+Wf2s65f1BYxHx+T3ae/grAPtUM348U7lJoeJLeFplLVtAHbhlLwRRoeXBfJoUny3JhY/R8LpTvlj5e6KSwGNp/dFHo0dF2gzq2mEoFRXSwOOW/SyQN4Elp94= 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=dRrGxwea; arc=none smtp.client-ip=170.10.133.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="dRrGxwea" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708097332; 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=ddA7zwUE8jz8+b5sol2qfCRq18570UeGwF1LeSkNhuk=; b=dRrGxweaJCaR85willpiK6udiMgFasQu8JJEueRdeNFY7+gyVPSuLXrkC0yN/JG6AZoh2h 4vA5kbScRxVTDMmcpEia7hMfNbzk/TlQkx+GyBMsAWA7SQ8IfK+ij1Hp9yvhxXbkL7rwWI nhqEv+VrrXNnG5VITzFTpjC8STQyu6c= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-670-cleYxLT9OSSy96xXZmVwGQ-1; Fri, 16 Feb 2024 10:28:49 -0500 X-MC-Unique: cleYxLT9OSSy96xXZmVwGQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id E54BA108C062; Fri, 16 Feb 2024 15:28:48 +0000 (UTC) Received: from RHTPC1VM0NT.lan (unknown [10.22.33.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 691F31C060B1; Fri, 16 Feb 2024 15:28:48 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Pravin B Shelar , dev@openvswitch.org, Ilya Maximets , Simon Horman , Eelco Chaudron , Shuah Khan , linux-kselftest@vger.kernel.org Subject: [RFC 2/7] selftests: openvswitch: be more verbose with selftest debugging Date: Fri, 16 Feb 2024 10:28:41 -0500 Message-ID: <20240216152846.1850120-3-aconole@redhat.com> In-Reply-To: <20240216152846.1850120-1-aconole@redhat.com> References: <20240216152846.1850120-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.4.1 on 10.11.54.7 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC 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 --- tools/testing/selftests/net/openvswitch/openvswitch.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh index 87b80bee6df4..a5dbde482ba4 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,9 +142,10 @@ 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 + info "Flow added." return 0 } From patchwork Fri Feb 16 15:28:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 13560216 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 BAAFD12FF8B for ; Fri, 16 Feb 2024 15:28:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097337; cv=none; b=qdzGSWpEzkDQ1xEZluvhImTMVFTsneV5mJiaf5M5IlW9OiT4Grk7D+suC3/TacuvOF5cA7q8y8kR1O+PtzAQlJdOHj+3DeMYPnmTQRfKdyZFVzx/mioGm4vxgnEyoCObjgSOz+sAKrsU54CFMyo9A0WvA3MSmqoTE16Ik0iz44g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097337; c=relaxed/simple; bh=2ScCJrJA5lZdY9sBm7rVR9EfM9rjVK16M7AEmsYUz5M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kJ59dl06rstCl2DIVuPROEdw2BIjYDYYAwc2D/dRHyHcuu2iq8odCJODr82SZ5+7h3w4SbFN2QHQjzzTC7CMfeomwgYakn9/ALUAbXyYONWAzQW316VAvR4/edbMl8cTHelDU8M1QLvp6ggPinKp+eGdLnP9oy+p/CH/PrhNZhE= 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=NeA6f1K2; arc=none smtp.client-ip=170.10.133.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="NeA6f1K2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708097334; 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=cS43J9B9DiB6M1fCrf9zR1TxskmGVyf4cYBuBgPYnU4=; b=NeA6f1K2rIscmBc4NaKQlI+A/sYuwsClhIghEHzRo8C478uNUbh6rvI1t1QYHzsSGZES4c 7JmQFDD2A+xSMpULCMycOtBpjRnYG2EggN1Csi8s3aMrJLdacHOXQXEeXlbWcHMCWM9506 yTZy1DoncljsfgKr2pXpNdcDkGZqxEE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-124-atuG1hO_OXqmsDcTnLLUYQ-1; Fri, 16 Feb 2024 10:28:50 -0500 X-MC-Unique: atuG1hO_OXqmsDcTnLLUYQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 71681863725; Fri, 16 Feb 2024 15:28:49 +0000 (UTC) Received: from RHTPC1VM0NT.lan (unknown [10.22.33.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id F2B4D1C06890; Fri, 16 Feb 2024 15:28:48 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Pravin B Shelar , dev@openvswitch.org, Ilya Maximets , Simon Horman , Eelco Chaudron , Shuah Khan , linux-kselftest@vger.kernel.org Subject: [RFC 3/7] selftests: openvswitch: use non-graceful kills when needed Date: Fri, 16 Feb 2024 10:28:42 -0500 Message-ID: <20240216152846.1850120-4-aconole@redhat.com> In-Reply-To: <20240216152846.1850120-1-aconole@redhat.com> References: <20240216152846.1850120-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.4.1 on 10.11.54.7 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Normally a spawned process under OVS is given a SIGTERM when the test ends as part of cleanup. However, in case the process is still lingering for some reason, we also send a SIGKILL to force it down faster. Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/openvswitch.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh index a5dbde482ba4..678a72ad47c1 100755 --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh @@ -91,7 +91,8 @@ ovs_add_if () { python3 $ovs_base/ovs-dpctl.py add-if \ -u "$2" "$3" >$ovs_dir/$3.out 2>$ovs_dir/$3.err & pid=$! - on_exit "ovs_sbx $1 kill -TERM $pid 2>/dev/null" + on_exit "ovs_sbx $1 kill --timeout 1000 TERM \ + --timeout 1000 KILL $pid 2>/dev/null" fi } @@ -108,7 +109,8 @@ ovs_netns_spawn_daemon() { info "spawning cmd: $*" ip netns exec $netns $* >> $ovs_dir/stdout 2>> $ovs_dir/stderr & pid=$! - ovs_sbx "$sbx" on_exit "kill -TERM $pid 2>/dev/null" + ovs_sbx "$sbx" on_exit "kill --timeout 1000 TERM \ + --timeout 1000 KILL $pid 2>/dev/null" } ovs_add_netns_and_veths () { From patchwork Fri Feb 16 15:28:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 13560215 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 C885A137C5F for ; Fri, 16 Feb 2024 15:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097336; cv=none; b=c5fHGFmz7hDjxbUpJSyPCQ/QMsUWJJZD7e8du00efKGGkVOsiBO/zsAVZTwXJ2P3qfmyAKJ46f1NI/s/nFcEwUG6f3kAhkEDkexYmzV7UlIQou6okkcccHWPwYIq7lbGpkKkHwJDJe6WZI3Jr1MCCWST45RTjMwIbXZkKwvPV1c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097336; c=relaxed/simple; bh=+VPEA2dIxiq+tX8ezqarB+b9JozN2PIUG9DrLT+mW38=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NmJWgWOnASHYHp2fWU32+tBb+Jp/yoFCFnIfGFYNj+OhRPEQUQHguG1KKVLqDCNBn27BKPnQ4eEJNcWwGiw1V9c7RqXECvcfF/GLerNqrNprJ44KAuogrHQsmSswyXSmKz0oCT0p9iEhC7H6tkgcc/uceT5rh4zuSGZSQMMe0Mg= 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=gRoRWqFU; arc=none smtp.client-ip=170.10.133.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="gRoRWqFU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708097333; 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=fJ92gCXKw2n0LovijjEifDOZBlKXAd8WxMwKdfCj/2k=; b=gRoRWqFUo6Vz5Vv1U8XgMRLQpON1t+J87qTYfPSurbK3vft20AZpv96hgH0AzCGUHX4aD3 ZOlIA93p2q0ADVVmdrSCt3T295rkh5tCUCbwF6bREk0Sv5dCiPZgbZjdyhyoc7Tqu0UBHE QxnqvUslmjSKmorY57XKOxcoX2CYDlI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-92-8_nAtaiIPCazoS_e_UC5-w-1; Fri, 16 Feb 2024 10:28:50 -0500 X-MC-Unique: 8_nAtaiIPCazoS_e_UC5-w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 00E81185A784; Fri, 16 Feb 2024 15:28:50 +0000 (UTC) Received: from RHTPC1VM0NT.lan (unknown [10.22.33.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F84C1C05E0F; Fri, 16 Feb 2024 15:28:49 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Pravin B Shelar , dev@openvswitch.org, Ilya Maximets , Simon Horman , Eelco Chaudron , Shuah Khan , linux-kselftest@vger.kernel.org Subject: [RFC 4/7] selftests: openvswitch: delete previously allocated netns Date: Fri, 16 Feb 2024 10:28:43 -0500 Message-ID: <20240216152846.1850120-5-aconole@redhat.com> In-Reply-To: <20240216152846.1850120-1-aconole@redhat.com> References: <20240216152846.1850120-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.4.1 on 10.11.54.7 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Many openvswitch test cases reused netns and interface names. This works fine as long as the test case cleans up gracefully. However, if there is some kind of ungraceful termination (such as an external signal) the netns or interfaces can be left lingering. This happens when the selftest timeout gets exceeded, while running under very slow debugging conditions. The solution here is to cleanup the netns on executing the next test. Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/openvswitch.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh index 678a72ad47c1..8dc315585710 100755 --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh @@ -115,6 +115,10 @@ ovs_netns_spawn_daemon() { ovs_add_netns_and_veths () { info "Adding netns attached: sbx:$1 dp:$2 {$3, $4, $5}" + ntns_e=`ip netns list | grep $3` + [ "$ntns_e" != "" ] && ip netns del "$3" + if4_e=`ip link show $4 2>/dev/null` + [ "$if4_e" != "" ] && ip link del "$4" ovs_sbx "$1" ip netns add "$3" || return 1 on_exit "ovs_sbx $1 ip netns del $3" ovs_sbx "$1" ip link add "$4" type veth peer name "$5" || return 1 From patchwork Fri Feb 16 15:28:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 13560217 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 A732C13AA56 for ; Fri, 16 Feb 2024 15:28:56 +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=1708097338; cv=none; b=eRU1gKaTbVBuhXLTMVHZcW5aM5bEi5foxxPdf9yd0+uhp6fDjGSDyY06F2sNvFtkV0UT7Je71sHF++v22XY8nuSIstTBtHMC6zfEBHD4iRDrBFgyO8QCapKkY+sp1+WHqaw9Zhv+1FnnekU3AtlSWarHSQQedCj9Mqcbqh4Ko0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097338; c=relaxed/simple; bh=gFKj/PeEIe6OjteVeU7pc6vwa/E3Z3NoAKff2scSwiQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M7LGDH5yyiAEvbq+evLuFSIYIzles47jNFnNDj6soebC73UdC3/lHZ0XPgpJscwlY78XK2uJhvgZl3kp5l7+4xopGBBT5RjvUZm/UzkEv5rfXGTyP6mfIK5kdMglfP4S3Mgw5pIRVmeZJLl7GSKhcvwwhoZB3lqCW4SO0D/nT2E= 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=W66p4Xsr; 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="W66p4Xsr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708097335; 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=aD4pjXcBxUTwpnjEXzSh5eXbo4UExERB9Ao4MtQZ2EA=; b=W66p4Xsr0EqqqXGOIRDlPZ+HBNxIDJ5MhIix35tiM1WTew4Fp6Yjh6x3beeKFg26vtmmXN PdRhqrgISIe0WmJKHxOkl3MLiVHlfjdq/15+rxIYtFYEuZANyJplDMtVd0tNT2Re8/YYP5 f+g9Acq2brF8a6oRkzDqVc5oKEgVEnQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-323-ehuCETy6MRiidclAeDfzIw-1; Fri, 16 Feb 2024 10:28:51 -0500 X-MC-Unique: ehuCETy6MRiidclAeDfzIw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7C93B3C1E9CA; Fri, 16 Feb 2024 15:28:50 +0000 (UTC) Received: from RHTPC1VM0NT.lan (unknown [10.22.33.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E5AA1C06532; Fri, 16 Feb 2024 15:28:50 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Pravin B Shelar , dev@openvswitch.org, Ilya Maximets , Simon Horman , Eelco Chaudron , Shuah Khan , linux-kselftest@vger.kernel.org Subject: [RFC 5/7] selftests: openvswitch: make arping test a bit 'slower' Date: Fri, 16 Feb 2024 10:28:44 -0500 Message-ID: <20240216152846.1850120-6-aconole@redhat.com> In-Reply-To: <20240216152846.1850120-1-aconole@redhat.com> References: <20240216152846.1850120-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.4.1 on 10.11.54.7 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC The arping test transmits a single packet and immediately tries to pull the log for upcall details. This works fine in practice on most systems but can fail under a slower VM where it can take a while for the log data to be written. By adding addtional transmits we give the system time to write, and also increase the opportunity to not miss processing the upcall queue. Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/openvswitch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh index 8dc315585710..a2c106104fb8 100755 --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh @@ -598,7 +598,7 @@ test_upcall_interfaces() { sleep 1 info "sending arping" - ip netns exec upc arping -I l0 172.31.110.20 -c 1 \ + ip netns exec upc arping -I l0 172.31.110.20 -c 3 \ >$ovs_dir/arping.stdout 2>$ovs_dir/arping.stderr grep -E "MISS upcall\[0/yes\]: .*arp\(sip=172.31.110.1,tip=172.31.110.20,op=1,sha=" $ovs_dir/left0.out >/dev/null 2>&1 || return 1 From patchwork Fri Feb 16 15:28:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 13560214 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 1FDBB12FF84 for ; Fri, 16 Feb 2024 15:28:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097335; cv=none; b=rjJVR7amBZjgRpZmETnqkqA7IjP4DAo4Dui5/2bMxaQH+KpWst0TvJPUBARJ2n6LBzuAkXVx2tL7MNRd9ibnH/mVFxxpgU173RRTcV31oAzcseoQ188P8kf+DpAjEB17p9oxKckTPCgOKeUC5IcIKdQFwXo83Wi0N9B/WMKvdtw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097335; c=relaxed/simple; bh=Mif2Pw9Dh6MEkFyqulQXsxVjnIm4JFp+wr4NhK2k9K8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sfk/RVdwAqjQj0X7NatguzjBvdJPHsb/3BrLTf5vQnPP2evOOyaWKstj558nrrnWp0l6rqHmXM4FJV8Yf32WaDqlRs+0qnVqyaP4WG3vJCNK3u4YNwQ/m8Xew5w5I0DtCtJBM/+xhUv4lsstOCM1zYBe0WtdrjYhBXgUX136bxI= 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=grz+0Mh3; arc=none smtp.client-ip=170.10.133.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="grz+0Mh3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708097333; 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=X7CZOyXG6xCsS25p93OCgGL3CKwaUM6KdPuUn2c9nUM=; b=grz+0Mh3e56Si5ouaqrxkMxmyng77uo5ipxXsfhASx0rIv9Rsu67yGKkivpnbh2WTwFpxc lgE8e9PJi2A0/klWddQyJ0y3sguscsIj6s8DmCuAcIWXkz9WX/cQ2bJdICW3sigQPSuuW9 12wU+apPehF8hRNXaXWb+elG52xTwGQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-654-F2P-j2oBNnyNfOk3U04lOg-1; Fri, 16 Feb 2024 10:28:51 -0500 X-MC-Unique: F2P-j2oBNnyNfOk3U04lOg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 04472863721; Fri, 16 Feb 2024 15:28:51 +0000 (UTC) Received: from RHTPC1VM0NT.lan (unknown [10.22.33.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89C3F1C060B1; Fri, 16 Feb 2024 15:28:50 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Pravin B Shelar , dev@openvswitch.org, Ilya Maximets , Simon Horman , Eelco Chaudron , Shuah Khan , linux-kselftest@vger.kernel.org Subject: [RFC 6/7] selftests: openvswitch: insert module when running the tests Date: Fri, 16 Feb 2024 10:28:45 -0500 Message-ID: <20240216152846.1850120-7-aconole@redhat.com> In-Reply-To: <20240216152846.1850120-1-aconole@redhat.com> References: <20240216152846.1850120-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.4.1 on 10.11.54.7 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC The openvswitch tests do not attempt to insert the openvswitch module automatically. Now the test will auto load the module and try to unload it at the end. The test harness includes the option to not load the module, which is helpful when developing changes and loading the module from a different location. Signed-off-by: Aaron Conole --- .../testing/selftests/net/openvswitch/openvswitch.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh index a2c106104fb8..e7c9b4fc5591 100755 --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh @@ -672,12 +672,14 @@ run_test() { exitcode=0 desc=0 all_skipped=true +LOAD_MOD=yes while getopts :pvt o do case $o in p) PAUSE_ON_FAIL=yes;; v) VERBOSE=1;; + n) LOAD_MOD=no;; t) if which tcpdump > /dev/null 2>&1; then TRACING=1 else @@ -697,6 +699,10 @@ for arg do command -v > /dev/null "test_${arg}" || { echo "=== Test ${arg} not found"; usage; } done +if [ "$LOAD_MOD" == "yes" ]; then + modprobe openvswitch +fi + name="" desc="" for t in ${tests}; do @@ -716,4 +722,9 @@ for t in ${tests}; do desc="" done + +if [ "$LOAD_MOD" == "yes" ]; then + modprobe -r openvswitch +fi + exit ${exitcode} From patchwork Fri Feb 16 15:28:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 13560218 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 0D4031420DF for ; Fri, 16 Feb 2024 15:28:58 +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=1708097340; cv=none; b=SKW7NV+XXroboylRJ5Qk8daoxSdugk7O4bjbR0LQexVkp5rWZ+KVqhLHK4D3qhcM+DlR4faG1Grp2k7AhxvtgLzzYriGBbF+Fy6LLSDUlokfB5IwJYVekdR4ZE3Gsuz5IFvjBA1Z9r2wazNliltWZrhvJ0hTRdajzXznttyWtnA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097340; c=relaxed/simple; bh=XwSfzrGlsJBkrndaH9YkOTz2VtQoc4j1IzY2e0riSOM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=on0pwizQRC1uF770aFWOQ9/H9rypvf/iTUCyicILOjH8CQZsec8AQ6nncP2m4EcidzG4jhA/SbQVjp8WkFd5Wil07qN11W5u28wjhiGimJeND5ngDC8fB6ZwsBKTZbwv/yb6IG8hdPlloLosJnDfkaqqym+YwW0aKRzhJ/AeWAI= 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=HHGOykPZ; 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="HHGOykPZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708097337; 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=9AipKYmwTOX0KaIYggbIWRV31BYVphMNMwXphJHYrw8=; b=HHGOykPZiXNusUxD5roWmO6y7atSEEZAznT//ghWQ+oHf/CJ5LtN/uIyrcldjxNVX1KA/a 1FjT/pCBSQFfjyc+aEygps+064jEcRnRTGENYsd9gRjX6gdh32FJ6/gckbjbVtUeJL/s1q Rco1lr8HdNOEIrIHV40ndyQZ49u3YoA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-541-INOvlRtuOvSHdzhw-Zjj3Q-1; Fri, 16 Feb 2024 10:28:53 -0500 X-MC-Unique: INOvlRtuOvSHdzhw-Zjj3Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 860A885A58A; Fri, 16 Feb 2024 15:28:51 +0000 (UTC) Received: from RHTPC1VM0NT.lan (unknown [10.22.33.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1369D1C066AA; Fri, 16 Feb 2024 15:28:51 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Pravin B Shelar , dev@openvswitch.org, Ilya Maximets , Simon Horman , Eelco Chaudron , Shuah Khan , linux-kselftest@vger.kernel.org Subject: [RFC 7/7] selftests: openvswitch: add config and timeout settings Date: Fri, 16 Feb 2024 10:28:46 -0500 Message-ID: <20240216152846.1850120-8-aconole@redhat.com> In-Reply-To: <20240216152846.1850120-1-aconole@redhat.com> References: <20240216152846.1850120-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.4.1 on 10.11.54.7 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC In order for the ovs selftests to run, we need to introduce a sample configuration. This will get run under the kselftest runner for net, but given that environment can be limited process wise, the test can take longer than on bare metal or high availability VMs. So, also introduce a settings file which includes a timeout value that should be sufficent for such environments. Signed-off-by: Aaron Conole --- .../testing/selftests/net/openvswitch/config | 50 +++++++++++++++++++ .../selftests/net/openvswitch/settings | 1 + 2 files changed, 51 insertions(+) create mode 100644 tools/testing/selftests/net/openvswitch/config create mode 100644 tools/testing/selftests/net/openvswitch/settings diff --git a/tools/testing/selftests/net/openvswitch/config b/tools/testing/selftests/net/openvswitch/config new file mode 100644 index 000000000000..24cff330f3c0 --- /dev/null +++ b/tools/testing/selftests/net/openvswitch/config @@ -0,0 +1,50 @@ +CONFIG_OPENVSWITCH=m +CONFIG_OPENVSWITCH_GRE=m +CONFIG_OPENVSWITCH_VXLAN=m +CONFIG_OPENVSWITCH_GENEVE=m +CONFIG_NF_CONNTRACK_OVS=y +CONFIG_NF_NAT_OVS=y +CONFIG_NF_NAT=m +CONFIG_NF_CONNTRACK=m +CONFIG_GENEVE=y +CONFIG_VXLAN=y +CONFIG_IPV6=y +CONFIG_TUN=y +CONFIG_TAP=y +CONFIG_USER_NS=y +CONFIG_NET_NS=y +CONFIG_SYSFS=y +CONFIG_PROC_SYSCTL=y +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_VETH=y +CONFIG_DUMMY=y +CONFIG_NETFILTER=y +CONFIG_NETFILTER_ADVANCED=y +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP6_NF_NAT=m +CONFIG_IP_NF_NAT=m +CONFIG_IPV6_GRE=m +CONFIG_TRACEPOINTS=y +CONFIG_NET_DROP_MONITOR=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_IPV6=y +CONFIG_NF_TABLES_IPV4=y +CONFIG_KALLSYMS=y +CONFIG_BRIDGE=m +CONFIG_VLAN_8021Q=m +CONFIG_BRIDGE_VLAN_FILTERING=y +CONFIG_NET_L3_MASTER_DEV=y +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_NET_VRF=m +CONFIG_BPF_SYSCALL=y +CONFIG_CGROUP_BPF=y +CONFIG_NET_ACT_CT=m +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_MPLS=m +CONFIG_NET_ACT_VLAN=m +CONFIG_NET_CLS_FLOWER=m +CONFIG_NET_CLS_MATCHALL=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_ACT_GACT=m +CONFIG_NAMESPACES=y diff --git a/tools/testing/selftests/net/openvswitch/settings b/tools/testing/selftests/net/openvswitch/settings new file mode 100644 index 000000000000..694d70710ff0 --- /dev/null +++ b/tools/testing/selftests/net/openvswitch/settings @@ -0,0 +1 @@ +timeout=300