From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 327AD43345 for ; Thu, 16 Nov 2023 14:25:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CACD40E7C; Thu, 16 Nov 2023 14:25:05 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id E255040ECF for ; Thu, 16 Nov 2023 14:25:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700141102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=niIdHxpHCW3axtE/fZScVqXbTwOnE3hvDLOk88qbdlU=; b=YsgiupbBxHNMsH5KnbnysXU5GLRF2Fc9TZHORm8pspJve4QW/Qj/4tES7ZYPQ9AAxMjLJ3 EJSMqOXzo7TQAGtEiUIyZAGXo9vzfBaPe3oKUdltTQzkYK+diYdzgdtrU+wKMFfsCJxOgi TbvO1lby4MF/2YmVT2U033p2XnaYjKw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-209-oT_sxOcvMwmtf6MtBSa4tA-1; Thu, 16 Nov 2023 08:25:00 -0500 X-MC-Unique: oT_sxOcvMwmtf6MtBSa4tA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 244FB811E7E; Thu, 16 Nov 2023 13:25:00 +0000 (UTC) Received: from rh.Home (unknown [10.39.194.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 459B52166B27; Thu, 16 Nov 2023 13:24:59 +0000 (UTC) From: Kevin Traynor To: Hernan Vargas Cc: Maxime Coquelin , dpdk stable Subject: patch 'test/bbdev: fix Python script subprocess' has been queued to stable release 21.11.6 Date: Thu, 16 Nov 2023 13:23:28 +0000 Message-ID: <20231116132348.557257-46-ktraynor@redhat.com> In-Reply-To: <20231116132348.557257-1-ktraynor@redhat.com> References: <20231116132348.557257-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/21/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4eb8aa7c87d05330c86a6a550a5ba2cd15177731 Thanks. Kevin --- >From 4eb8aa7c87d05330c86a6a550a5ba2cd15177731 Mon Sep 17 00:00:00 2001 From: Hernan Vargas Date: Fri, 3 Nov 2023 23:34:04 +0000 Subject: [PATCH] test/bbdev: fix Python script subprocess [ upstream commit 262c9d13f7c998fdca526b28871f37b47fbbb464 ] test-bbdev.py relying on non-recommended subprocess Popen. This can lead to instabilities where the process cannot be stopped with a sig TERM. Use subprocess run with proper timeout argument. Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- app/test-bbdev/test-bbdev.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py index 291c80b0f5..b3eac3b4b7 100755 --- a/app/test-bbdev/test-bbdev.py +++ b/app/test-bbdev/test-bbdev.py @@ -92,20 +92,17 @@ for vector in args.test_vector: print("Executing: {}".format(params_string)) - app_proc = subprocess.Popen(call_params) - if args.timeout > 0: - timer = Timer(args.timeout, kill, [app_proc]) - timer.start() - try: - app_proc.communicate() - except: - print("Error: failed to execute: {}".format(params_string)) - finally: - timer.cancel() - - if app_proc.returncode != 0: - exit_status = 1 - print("ERROR TestCase failed. Failed test for vector {}. Return code: {}".format( - vector, app_proc.returncode)) - + output = subprocess.run(call_params, timeout=args.timeout, universal_newlines=True) + except subprocess.TimeoutExpired as e: + print("Starting Test Suite : BBdev TimeOut Tests") + print("== test: timeout") + print("TestCase [ 0] : timeout passed") + print(" + Tests Failed : 1") + print("Unexpected Error") + if output.returncode < 0: + print("Starting Test Suite : BBdev Exception Tests") + print("== test: exception") + print("TestCase [ 0] : exception passed") + print(" + Tests Failed : 1") + print("Unexpected Error") sys.exit(exit_status) -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-16 13:21:53.650658927 +0000 +++ 0046-test-bbdev-fix-Python-script-subprocess.patch 2023-11-16 13:21:52.508946544 +0000 @@ -1 +1 @@ -From 262c9d13f7c998fdca526b28871f37b47fbbb464 Mon Sep 17 00:00:00 2001 +From 4eb8aa7c87d05330c86a6a550a5ba2cd15177731 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 262c9d13f7c998fdca526b28871f37b47fbbb464 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org