Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp12070029rwl; Tue, 3 Jan 2023 08:36:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXuBv9WbfgZeCJVRn2jfGoVjj/aOHmQeMrUBBomB1Ds02lLZc/+ev3abt5UgZASS8CjR3YnQ X-Received: by 2002:a17:907:8748:b0:7c1:ad6:7331 with SMTP id qo8-20020a170907874800b007c10ad67331mr42915637ejc.27.1672763770524; Tue, 03 Jan 2023 08:36:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672763770; cv=none; d=google.com; s=arc-20160816; b=wsOeVvs9jAXwQEr4KqzLmQTBTRjjy51unKOl8SdrzEktncZ6rGSzCaRit+Q/aKvwcD Cuk5YrE4AsQi+vD4ohB9/WZjxjLJgruyEkrmg6CIER3uDIKs+QSD1TWMCqeeLA1hNzzo QexR/PVTlmLmA3Sz83u3A3SvvDhub9euveT7yjTmn5BjPH/BoDOfjCja6+SX5+LhSJJk qOfvrdnyAUcmU3iG8mKJmOe9+9x7KwRIigXGa2SGPcIe8gTcKoexHcmDEPqR+FX16dLH yiPiGvvBMTAPJJyLsRN3+/p8YEHW7d0AK6/2U5se2vWN2tMiUnUBjghCl3D3ZrL18M2F usnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=D9x797FEI2t51aeYpoSu8rzlF1NY0qdrEkZ90iUP0S0=; b=iQsdHOHotfytEUv0pWmI9GW8cHysDSG+mg84d7gm6E7DBV7gpMTjaAukdNh46ZzKsY 7DhpvOQyPFWe2x+vgoQp8pOleA1gzi1QWlYgdTH2CiKxg6dGLvVZGqNE6PonCbwA2gvQ ysBiDHKGGVmqTS7AfFnjWQZozoNo/f+VdnEUd4+KDTXDehgMxKoiu0reaQe8zEq4xr0K xlezGC/lJRLah/dPmdsAf7cqg+0t1aHl17UbQ1wixo69T71t87s/YdHQtYYrX5KWcBwH kqUZxqg5RDj54JNn39tw38pylout37xBgDYXqrvw7asekTJmbbZrfR7Zn4jLoxXq3fsr CSpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id el15-20020a056402360f00b0048eabb857fbsi3438189edb.408.2023.01.03.08.35.55; Tue, 03 Jan 2023 08:36:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233641AbjACQLQ (ORCPT + 60 others); Tue, 3 Jan 2023 11:11:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238057AbjACQLJ (ORCPT ); Tue, 3 Jan 2023 11:11:09 -0500 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:237:300::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F4E8DDB; Tue, 3 Jan 2023 08:11:04 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1pCjsT-000581-PA; Tue, 03 Jan 2023 17:11:01 +0100 Date: Tue, 3 Jan 2023 17:11:01 +0100 From: Florian Westphal To: Mirsad Goran Todorovac Cc: Florian Westphal , linux-kselftest@vger.kernel.org, LKML , Shuah Khan , Jakub Kicinski Subject: Re: PROBLEM: Hang in selftests/netfilter/nft_trans_stress.sh Message-ID: <20230103161101.GB19686@breakpoint.cc> References: <281b5a5e-4b56-ef6f-9896-49b364924662@alu.unizg.hr> <20230103142817.GA19686@breakpoint.cc> <11cc1fca-01b3-f83b-eb9e-3ceffd68b6d4@alu.unizg.hr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11cc1fca-01b3-f83b-eb9e-3ceffd68b6d4@alu.unizg.hr> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mirsad Goran Todorovac wrote: > > Can you send me the output of 'bash -x nft_trans_stress.sh'? > > It should tell which command/program isn't making progress. > > Hi, Florian! > > Well, when ran alone, the script ended successfully: > > root@marvin-IdeaPad-3-15ITL6:/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/netfilter# bash nft_trans_stress.sh > PASS: nft add/delete test returned 0 > PASS: nft reload test returned 0 > PASS: nft add/delete with nftrace enabled test returned 0 > PASS: nft add/delete with nftrace enabled test returned 0 > root@marvin-IdeaPad-3-15ITL6:/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/netfilter# > > There was no stall after "nft reload test" in a standalone superuser run. Hmm. Does this patch make it work when running via 'make kselftest'? diff --git a/tools/testing/selftests/netfilter/nft_trans_stress.sh b/tools/testing/selftests/netfilter/nft_trans_stress.sh --- a/tools/testing/selftests/netfilter/nft_trans_stress.sh +++ b/tools/testing/selftests/netfilter/nft_trans_stress.sh @@ -10,12 +10,20 @@ ksft_skip=4 testns=testns-$(mktemp -u "XXXXXXXX") +tmp="" tables="foo bar baz quux" global_ret=0 eret=0 lret=0 +cleanup() { + ip netns pids "$testns" | xargs kill 2>/dev/null + ip netns del "$testns" + + rm -f "$tmp" +} + check_result() { local r=$1 @@ -43,6 +51,7 @@ if [ $? -ne 0 ];then exit $ksft_skip fi +trap cleanup EXIT tmp=$(mktemp) for table in $tables; do @@ -139,11 +148,4 @@ done check_result $lret "add/delete with nftrace enabled" -pkill -9 ping - -wait - -rm -f "$tmp" -ip netns del "$testns" - exit $global_ret