From patchwork Tue Aug 16 16:50:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 74031 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp2099736qga; Tue, 16 Aug 2016 09:50:52 -0700 (PDT) X-Received: by 10.55.176.130 with SMTP id z124mr37416179qke.125.1471366252008; Tue, 16 Aug 2016 09:50:52 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f81si16834320qke.6.2016.08.16.09.50.51; Tue, 16 Aug 2016 09:50:51 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 5AB2761B98; Tue, 16 Aug 2016 16:50:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id CAADC60BEB; Tue, 16 Aug 2016 16:50:47 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 44A1C60BEC; Tue, 16 Aug 2016 16:50:46 +0000 (UTC) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by lists.linaro.org (Postfix) with ESMTPS id 50F9E60BDA for ; Tue, 16 Aug 2016 16:50:45 +0000 (UTC) Received: by mail-wm0-f41.google.com with SMTP id q128so155063776wma.1 for ; Tue, 16 Aug 2016 09:50:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tCTgeqNKtR94AhMJKm5fQJAMsTgSB9th1QKbHh6Y0fc=; b=NwkwGayloGWuIMJzhoCm52fOU+6vDZNDaJ0V3BCVuug+KNkZr38yTTmgFKzwCdiTjS qKoMgu9lWfEW5+nA3iBT58rg+eQEznoah1Fu+ds048j4tgXy0KQmrQQO77RuW3VJLtuu 0bskhtKHhgzLmO3b5m/kxtdOHsmvqdi8WQ+1YObVWdWDAgGx85fSJ0TjDuhfxUKHOf3W IL+d1ggcRKPcbBg63uZ+SKfOtivcRwcPV8+GCkHl4D4l7WbyjTTUL0rwIQgCXaQVpoAB Dnh3hzkHLYEb+a7uiaMXcaM1k8JhURd66NmYKWK0BFeMS07yUS5zW72EIzhemAJ9ncf1 vBUQ== X-Gm-Message-State: AEkoouvfrcFNrxGraxuLEidWcFjEDlnQ+CiiOrAWHfkqfYc64Gv8Ba5msWGCcYg+Rb3OFA0Gfb8= X-Received: by 10.25.32.136 with SMTP id g130mr6955191lfg.184.1471366244321; Tue, 16 Aug 2016 09:50:44 -0700 (PDT) Received: from localhost.localdomain ([83.220.239.147]) by smtp.gmail.com with ESMTPSA id g11sm923821lji.25.2016.08.16.09.50.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Aug 2016 09:50:43 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 16 Aug 2016 19:50:37 +0300 Message-Id: <1471366237-10369-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCH] test: linux-gen: ipc do not use pid -1 value X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" In docker $$ (current pid) is 1 for the first launched bash. 0 value in ipc .ns mixed up with NULL and not accepted. Also .ns value should not overflow signed int type. Signed-off-by: Maxim Uvarov --- test/linux-generic/pktio_ipc/pktio_ipc_run.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.7.1.250.gff4ea60 diff --git a/test/linux-generic/pktio_ipc/pktio_ipc_run.sh b/test/linux-generic/pktio_ipc/pktio_ipc_run.sh index 2f99f32..bd64baf 100755 --- a/test/linux-generic/pktio_ipc/pktio_ipc_run.sh +++ b/test/linux-generic/pktio_ipc/pktio_ipc_run.sh @@ -20,7 +20,10 @@ PATH=.:$PATH run() { local ret=0 - IPC_NS=$$ + IPC_NS=`expr $$ + 5000` + IPC_NS=`expr ${IPC_NS} % 65000` + IPC_NS=`expr ${IPC_NS} + 2` + echo "Using ns ${IPC_NS}" #if test was interrupted with CTRL+c than files #might remain in shm. Needed cleanely delete them. @@ -43,13 +46,17 @@ run() if [ $ret -ne 0 ]; then echo "!!!First stage FAILED $ret!!!" + ls -l /dev/shm/ exit $ret else echo "First stage PASSED" fi + echo "==== run pktio_ipc2 then pktio_ipc1 ====" IPC_NS=`expr $IPC_NS - 1` + echo "Using ns ${IPC_NS}" + pktio_ipc2${EXEEXT} -n ${IPC_NS} -t 10 & IPC_PID=$! @@ -59,6 +66,7 @@ run() if [ $ret -ne 0 ]; then echo "!!! FAILED !!!" + ls -l /dev/shm/ exit $ret else echo "Second stage PASSED"