From patchwork Fri Apr 6 12:31:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 895688 X-Patchwork-Delegate: akodanev@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40HfGC317Mz9s0x for ; Fri, 6 Apr 2018 22:32:03 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B35823E716E for ; Fri, 6 Apr 2018 14:32:00 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) by picard.linux.it (Postfix) with ESMTP id 821A93E7035 for ; Fri, 6 Apr 2018 14:31:52 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 30165605638 for ; Fri, 6 Apr 2018 14:31:51 +0200 (CEST) Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 75650AFDA; Fri, 6 Apr 2018 12:31:51 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Fri, 6 Apr 2018 14:31:16 +0200 Message-Id: <20180406123118.21309-6-pvorel@suse.cz> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180406123118.21309-1-pvorel@suse.cz> References: <20180406123118.21309-1-pvorel@suse.cz> X-Virus-Scanned: clamav-milter 0.99.2 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Subject: [LTP] [RFC PATCH v6 5/7] network/if-updown: Restore IP in cleanup function X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" While this is not visible due current test content in runtest file (net_stress.interface), where other tests reset the settings, it is needed as it break if-mtu-change on IPv6: if-mtu-change 1 TINFO: set MTU to 1280 1/2 if-mtu-change 1 TFAIL: tst_ping IPv6 iface fd00:1:1:1::2, msg_size 1: fail Test with runtest file: if4-updown if-updown if6-mtu-change if-mtu-change -6 Signed-off-by: Petr Vorel --- testcases/network/stress/interface/if-updown | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/testcases/network/stress/interface/if-updown b/testcases/network/stress/interface/if-updown index 264331adb..45cf0feaf 100644 --- a/testcases/network/stress/interface/if-updown +++ b/testcases/network/stress/interface/if-updown @@ -19,12 +19,18 @@ TST_TOTAL=2 -TST_CLEANUP="netstress_cleanup" +TST_CLEANUP="do_cleanup" . test_net_stress.sh CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IF_UPDOWN_TIMES / 20))} +do_cleanup() +{ + netstress_cleanup + restore_ipaddr +} + test_body() { local cmd_type=$1