From patchwork Thu Apr 12 16:09:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 897725 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=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="vbDYwrVf"; 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 40MQb93zF7z9s2M for ; Fri, 13 Apr 2018 01:59:45 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 5CAFE3E754C for ; Thu, 12 Apr 2018 17:59:42 +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 3ABC63E7532 for ; Thu, 12 Apr 2018 17:59:41 +0200 (CEST) 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-5.smtp.seeweb.it (Postfix) with ESMTPS id 3F38860097F for ; Thu, 12 Apr 2018 17:59:40 +0200 (CEST) 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 w3CFuLGx000864 for ; Thu, 12 Apr 2018 15:59:38 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=8XjN6anYT77eSRBBW4tHOYP65hdkiSEhuRod1KxRL0s=; b=vbDYwrVf36/eX32RwJaeHfx1yXinmRXp49iffR7saNoFVSHuHEe8rlfXvVQaQSnWxkvg ChpnEr/wwOL0DVUUO5vClpZDu4PkcrXkptqXRcOMWtLTSaKNmOs2KBsuE5sfyLcEuyGq 4I2dfz41eHFjKyh3XS3BLtIz8vg69JRiWf1Pcrw+swavs/DkzHGEhnqdzT3X2C8WWggi XTNidQuv7HegAqwNNj5T8eAE+fODBjSAhaHdFJskain5V3U4te9ICbmPsdT6S/zDIaFQ TPrVgDBbiNqiZtxFmtl7mMqfiRM2fCRC+ihS0w/e01Pehs3qo+/GwxWOOrYABqLD047O cw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2h6ne7mwdk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 12 Apr 2018 15:59:37 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w3CFxb1U024941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 12 Apr 2018 15:59:37 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w3CFxbEm029382 for ; Thu, 12 Apr 2018 15:59:37 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 12 Apr 2018 08:59:36 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Thu, 12 Apr 2018 19:09:11 +0300 Message-Id: <1523549352-1794-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=8861 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=676 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804120157 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.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 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] [PATCH 1/2] lib/tst_net.sh: don't init ltp_ns if custom is used 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" We can define our own LTP_NETNS with custom setup, don't setup the default one in that particular case. Signed-off-by: Alexey Kodanev --- testcases/lib/tst_net.sh | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh index bbef12a..53f6277 100644 --- a/testcases/lib/tst_net.sh +++ b/testcases/lib/tst_net.sh @@ -103,7 +103,7 @@ init_ltp_netspace() local pid= - if [ ! -f /var/run/netns/ltp_ns ]; then + if [ ! -f /var/run/netns/ltp_ns -a -z "$LTP_NETNS" ]; then ROD ip li add name ltp_ns_veth1 type veth peer name ltp_ns_veth2 pid="$(ROD ns_create net,mnt)" mkdir -p /var/run/netns @@ -112,6 +112,8 @@ init_ltp_netspace() ROD ns_exec $pid net,mnt mount -t sysfs none /sys ROD ns_ifmove ltp_ns_veth1 $pid ROD ns_exec $pid net,mnt ip li set lo up + else + tst_res_ TINFO "using not default LTP netns: '$LTP_NETNS'" fi LHOST_IFACES="${LHOST_IFACES:-ltp_ns_veth2}"