From patchwork Wed Mar 21 11:39:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 888708 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=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="qIjeZnZ1"; dkim-atps=neutral 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 405nfR0h3Lz9s12 for ; Wed, 21 Mar 2018 22:30:22 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id AF36F3E7563 for ; Wed, 21 Mar 2018 12:29:57 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) by picard.linux.it (Postfix) with ESMTP id 11DA73E754F for ; Wed, 21 Mar 2018 12:29:55 +0100 (CET) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id A95806011F9 for ; Wed, 21 Mar 2018 12:29:54 +0100 (CET) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2LBQgbs101687 for ; Wed, 21 Mar 2018 11:29:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2017-10-26; bh=/jauxVyiAYSvwe6hfNCNFa+AfFp7pG1c2J2nw04CKvo=; b=qIjeZnZ1T8ITW2ZaalV4Twt/XJGPTFQuf+dLowk+lBbByX99XHmTjWtrUndW0q3Lek4j 4oyFfPp/cBKZwR/TryH/SuB5V+rczwg4WGHJaPsQgE5Mu+GnsnjqCz12muq1oi9ZSv1b foZlwQCqabZNszpF15tg5k+vesGubhYfoTkRsXfmAy4Gzy2DWoZ5/Em9hJ1RHmY5Pxl8 E15rhjbkzDbqQU+ev4yyBj9wtleK9Jc4wx+Ug9J/ql48SbY1KLDztNEpqIKMzQuow1ED VfQIc3xBbZ2kPsYAGlZ0srM3Wb7ukP4GOM22Ct3/cUeVCrTFhxFJf85A/DkwkFUi1EKw Dg== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2guph880bq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 21 Mar 2018 11:29:52 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2LBTqEi020631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 21 Mar 2018 11:29:52 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w2LBTqxf032293 for ; Wed, 21 Mar 2018 11:29:52 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 21 Mar 2018 04:29:52 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Wed, 21 Mar 2018 14:39:09 +0300 Message-Id: <1521632349-12990-1-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8838 signatures=668695 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=649 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803200127 X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH COMMITTED] lib/tst_net_iface_prefix: export correct env variable for interface 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" This is fixing setups with different interface names between local and remote host. netns setup is not affected because interface names are set explicitly before the exports with tst_net_iface_prefix. Signed-off-by: Alexey Kodanev --- testcases/lib/tst_net_iface_prefix.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/testcases/lib/tst_net_iface_prefix.c b/testcases/lib/tst_net_iface_prefix.c index 3868d36..a9e3882 100644 --- a/testcases/lib/tst_net_iface_prefix.c +++ b/testcases/lib/tst_net_iface_prefix.c @@ -152,13 +152,11 @@ int main(int argc, char *argv[]) else get_in_addr(ip_str, &ip); - if (is_ipv6) { - print_svar_change("LHOST_IFACES", iface); + print_svar_change(is_rhost ? "RHOST_IFACES" : "LHOST_IFACES", iface); + if (is_ipv6) print_ivar(is_rhost ? "IPV6_RPREFIX" : "IPV6_LPREFIX", prefix); - } else { - print_svar_change("RHOST_IFACES", iface); + else print_ivar(is_rhost ? "IPV4_RPREFIX" : "IPV4_LPREFIX", prefix); - } exit(EXIT_SUCCESS); }