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 Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E02A9C433EF for ; Tue, 25 Jan 2022 09:08:24 +0000 (UTC) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 50D283C95F0 for ; Tue, 25 Jan 2022 10:08:22 +0100 (CET) Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 661C63C5924 for ; Tue, 25 Jan 2022 10:08:13 +0100 (CET) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 in-4.smtp.seeweb.it (Postfix) with ESMTPS id E1FD61000A3C for ; Tue, 25 Jan 2022 10:08:12 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9AACA2113B; Tue, 25 Jan 2022 09:08:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1643101691; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Vv/G1Hjb+CUN5qvFcCTdgBzaiwu/sjviGxDPqN0dI0M=; b=ADUnP2C4w/69Lh5wuTzGVWaLFiNnvbrROATcCzSCqUp3xdESU3qQidwcT9d84wK9aXunO+ 0txfhSWFYGtArfNLj3SpjF7FKoB19BMR5ASfHpoezH7l1x4U7OGLS4s3jHo0voM3P+Yc2Q nlmuEtUZWdnTXKeAXuyEq3vGSx2cymw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1643101691; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Vv/G1Hjb+CUN5qvFcCTdgBzaiwu/sjviGxDPqN0dI0M=; b=+yDR4aicUDrlslI+FH67pHpbTp4+hlrTPrRAiqM5G1wV64lF2ELCRhxBBh3X6ugqaVtJtm thEdoHiLbDbFkNCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 53D9013DA0; Tue, 25 Jan 2022 09:08:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id E0Q3Evu972FaPgAAMHmgww (envelope-from ); Tue, 25 Jan 2022 09:08:11 +0000 Date: Tue, 25 Jan 2022 10:08:09 +0100 From: Petr Vorel To: Alexey Kodanev Message-ID: References: <20220124220334.154003-1-petr.vorel@gmail.com> <29051e9c-f4c2-9840-7f84-8c9f49efba93@bell-sw.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <29051e9c-f4c2-9840-7f84-8c9f49efba93@bell-sw.com> X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean Subject: Re: [LTP] [PATCH 1/2] tst_net.sh: Fix for disabled IPv6 X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Petr Vorel Cc: ltp@lists.linux.it Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" Hi Alexey, all, ... > > @@ -971,8 +1003,16 @@ IPV6_RHOST="${IPV6_RHOST:-fd00:1:1:1::1/64}" > > if [ -z "$_tst_net_parse_variables" ]; then > > eval $(tst_net_ip_prefix $IPV4_LHOST || echo "exit $?") > > eval $(tst_net_ip_prefix -r $IPV4_RHOST || echo "exit $?") > > - eval $(tst_net_ip_prefix $IPV6_LHOST || echo "exit $?") > > - eval $(tst_net_ip_prefix -r $IPV6_RHOST || echo "exit $?") > > + > > + tst_net_detect_ipv6 && TST_NET_LHOST_IPV6=1 > > + tst_net_detect_ipv6 rhost && TST_NET_RHOST_IPV6=1 > > + > > + if [ "$TST_NET_LHOST_IPV6" = 1 ]; then > > + eval $(tst_net_ip_prefix $IPV6_LHOST || echo "exit $?") > > + fi > > + if [ "$TST_NET_RHOST_IPV6" = 1 ]; then > > + eval $(tst_net_ip_prefix -r $IPV6_RHOST || echo "exit $?") > > + fi > Do we really need to keep around and check two variables? If at least > one machine doesn't have IPv6, it's not longer necessary to setup the > other. OK, just one variable is enough, e.g. TST_NET_REQUIRE_IPV6. @all: But netns_helper.sh, which does not use tst_net.sh also requires IPv6 (and there are probably more), thus how about adding flag TST_REQUIRE_IPV6 into tst_test.sh (would help also for documentation - docparse). And tst_net.sh would just on check also IPv6 on rhost. Kind regards, Petr -- Mailing list info: https://lists.linux.it/listinfo/ltp