From patchwork Wed Sep 7 20:50:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 75691 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp510766qgf; Wed, 7 Sep 2016 13:50:56 -0700 (PDT) X-Received: by 10.237.59.212 with SMTP id s20mr53361549qte.126.1473281456253; Wed, 07 Sep 2016 13:50:56 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m2si22885169qte.50.2016.09.07.13.50.55; Wed, 07 Sep 2016 13:50:56 -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 8B267616FA; Wed, 7 Sep 2016 20:50:55 +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 51040616E1; Wed, 7 Sep 2016 20:50:51 +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 8295F616E5; Wed, 7 Sep 2016 20:50:49 +0000 (UTC) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by lists.linaro.org (Postfix) with ESMTPS id 81F81616E0 for ; Wed, 7 Sep 2016 20:50:48 +0000 (UTC) Received: by mail-lf0-f42.google.com with SMTP id l131so7137593lfl.2 for ; Wed, 07 Sep 2016 13:50:48 -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=qyavPSY+nF81CxWrPzy9/0OQ3awZKo64o8iWUmmU+Jg=; b=lrkJPbvUQE8DIW4eFzCpdiaJE2lhreS9bGFz9E8bDnDoJCPuU3JaMuSE9+JNcBVTUg AIElrwKH/nNAQT+7+IxyJHs0yQE1ZtshD+f47UoksMyshSt5aXH2xpTLStiwdEUnyg4I w+w+9/hbgNTLDpAOsKAqbxySgpfrd5gjmiN08gU85T9pCFCeCZuk4BtpIkyXtE8K32yp 3zAcC55E25mui4QYN63GTlTdIvyE4bQCYcwqql2aX4J+ZAwSEVQsejN9UKNF68xneTvW Xp8E8PEpuhuKcmLZZUaFkEOvzvN9eKOpjeI7KdgQZMAjpyzjbApM7pCY1VULjUszfP8a Ws7Q== X-Gm-Message-State: AE9vXwOAMmMgnM7NV1scv+jkjE0BcYAvr3TjQslmfzehDeFIY7TAdW9ldMr6y1K8RzwlUz3rIJg= X-Received: by 10.25.150.141 with SMTP id y135mr462224lfd.66.1473281447335; Wed, 07 Sep 2016 13:50:47 -0700 (PDT) Received: from localhost.localdomain ([83.220.238.241]) by smtp.gmail.com with ESMTPSA id w15sm305350lfi.16.2016.09.07.13.50.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Sep 2016 13:50:46 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Wed, 7 Sep 2016 23:50:36 +0300 Message-Id: <1473281436-32284-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] linux-gen: pktio: handle exit if ipc app was killed 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 test script let master process finish his work and don't try to kill him if killing can be avoided. If kill invoked than do not dequeue from empty rings. Also it looks like there is some race exist on defining which app will be master and which will be slave if they run at the same time. After long run following script I do not see fails anymore: while true; do ./test/linux-generic/pktio_ipc/pktio_ipc_run.sh || exit 1; done https://bugs.linaro.org/show_bug.cgi?id=2505 Signed-off-by: Maxim Uvarov --- test/linux-generic/pktio_ipc/pktio_ipc_run.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) -- 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 bd64baf..86b7c82 100755 --- a/test/linux-generic/pktio_ipc/pktio_ipc_run.sh +++ b/test/linux-generic/pktio_ipc/pktio_ipc_run.sh @@ -30,8 +30,9 @@ run() rm -rf /dev/shm/odp-${IPC_NS}* 2>&1 > /dev/null echo "==== run pktio_ipc1 then pktio_ipc2 ====" - pktio_ipc1${EXEEXT} -n ${IPC_NS} -t 30 & + pktio_ipc1${EXEEXT} -n ${IPC_NS} -t 20 & IPC_PID=$! + sleep 1 pktio_ipc2${EXEEXT} -n ${IPC_NS} -t 10 ret=$? @@ -57,12 +58,16 @@ run() IPC_NS=`expr $IPC_NS - 1` echo "Using ns ${IPC_NS}" - pktio_ipc2${EXEEXT} -n ${IPC_NS} -t 10 & + pktio_ipc2${EXEEXT} -n ${IPC_NS} -t 20 & IPC_PID=$! + sleep 1 - pktio_ipc1${EXEEXT} -n ${IPC_NS} -t 20 + pktio_ipc1${EXEEXT} -n ${IPC_NS} -t 10 ret=$? - (kill ${IPC_PID} 2>&1 > /dev/null) > /dev/null || true + kill ${IPC_PID} 2>&1 > /dev/null + if [ $? -eq 0 ]; then + rm -rf /dev/shm/odp-${IPC_NS}* 2>&1 > /dev/null + fi if [ $ret -ne 0 ]; then echo "!!! FAILED !!!"