From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CDB7C43381 for ; Mon, 25 Feb 2019 12:56:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9E3C2146F for ; Mon, 25 Feb 2019 12:56:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727198AbfBYM41 (ORCPT ); Mon, 25 Feb 2019 07:56:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45428 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727192AbfBYM40 (ORCPT ); Mon, 25 Feb 2019 07:56:26 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 898404E92A; Mon, 25 Feb 2019 12:56:26 +0000 (UTC) Received: from elisabeth (ovpn-200-53.brq.redhat.com [10.40.200.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F7B35D71A; Mon, 25 Feb 2019 12:56:23 +0000 (UTC) Date: Mon, 25 Feb 2019 13:56:18 +0100 From: Stefano Brivio To: Sabrina Dubroca , Paolo Abeni Cc: netdev@vger.kernel.org, "David S. Miller" , David Ahern Subject: Re: [PATCH net v2 2/2] selftests: pmtu: add explicit tests for PMTU exceptions cleanup Message-ID: <20190225135618.5687e4c2@elisabeth> In-Reply-To: <20190225123330.GA10994@bistromath.localdomain> References: <6d6f6a2512743d6e1968dbfe765eb85b478bd033.1551093086.git.pabeni@redhat.com> <20190225123330.GA10994@bistromath.localdomain> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 25 Feb 2019 12:56:26 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 25 Feb 2019 13:33:30 +0100 Sabrina Dubroca wrote: > 2019-02-25, 12:13:46 +0100, Paolo Abeni wrote: > > + if ! timeout 1 ${ns_a} ip link del dev veth_A-R1; then > > That doesn't work. "ip link del" is stuck in a way that timeout can't > terminate it, so this is still going to hang. Did you actually test > this? :/ Indeed, upon actual testing, this hangs and the error is not reported. > > + err " can't delete veth device in a timely > > manner, PMTU dst likely leaked" > > + return 1 > > + fi > > + return 0 > > +} You can use a subshell here, something like: ${ns_a} ip link del dev veth_A-R1 & iplink_pid=$! sleep 1 if [ "$(cat /proc/${iplink_pid}/cmdline 2>/dev/null | tr -d '\0')" = "iplinkdeldevveth_A-R1" ]; then err " can't delete veth device in a timely manner, PMTU dst likely leaked" return 1 fi } and now that I tried to run as a single test and couldn't find it, I think it would also be worth it to rename the tests to something more sensible. Right now you have test_pmtu_ipv6_exception_cleanup() calling test_cleanup_...(), I think it's confusing. Just call the test test_cleanup_ipv6_exception(), it doesn't have so much to do with PMTU anyway. -- Stefano