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 2F6DE43337 for ; Wed, 15 Nov 2023 12:45:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28CFB40294; Wed, 15 Nov 2023 12:45:23 +0100 (CET) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mails.dpdk.org (Postfix) with ESMTP id 59DCA406A2 for ; Wed, 15 Nov 2023 12:45:21 +0100 (CET) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-32f78dcf036so453611f8f.0 for ; Wed, 15 Nov 2023 03:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700048721; x=1700653521; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=So/1aad+mKA0zvLHfI33t3UUqweQiZMmzNcLAz/iNHA=; b=b5UaJbzy28P8RdCV210Cukt01QAVSxI7cB6/cQAY6Adb+NFdjs7R7uPSB5OASb4qtI ZpSLSGJ3RzFrSOZJlGIevTXc5LBRGdYsu7Rdk9DhQy+LdJRnHp2nzPdbkSx6zGMR4tvz M616EeoUeGKB1uXozR6IVBf1rBAGqTRg+zMjLiYu01uaI0DFgP/DYUK+y5l2mnq5TE6+ MYmbggZBP0+ITDeLyfF0bbDqSWQo77vjZg11U7F5x13L4XCKvGVTnt2cMDBy7bkwcbPW eEmhMTeugc19egDCZdw1m2e1Jsio5d8SrZLoyvzG4lk9gHrnOMfBNYYQheJXF9+bAJGS Aq0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700048721; x=1700653521; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=So/1aad+mKA0zvLHfI33t3UUqweQiZMmzNcLAz/iNHA=; b=w9/B2YPSUP06MLsCIODuCgSS4+VDBFr+Dx1XpyzZc/4eA8ufOAuv3tsiqeIEaBJJCJ 29QLhYyZwNwjHcMpWtKrMuevpbGOqnVMNSqLJ0Dj9asYi5UuY0jfpZwzgkdnDCRldkzV D+uhsR8RIJEvthctCe4bCuGtnjDeY6Te/X9jQpzzE7Am5snnzkM1BQR1Hw0cm06G0Vlh qRwHTHbyouOn5Lzg0f4hWGVuleLZSvcIh+AXOfHcr9NGptAwS3ZXvL1eqeUxowKRiOX6 kSYFJ2tWvzdthZiFfA214QBEw9YdKeDWBOks4iGLgs9Qpk0hfcqPeGI1k52jg3DbolzZ sPwg== X-Gm-Message-State: AOJu0YzIJv8O4EWG4SpXYUmddn0wHx4EClFBNOGAHSCgPEd+aZc2UR1i SaBo8HEmf+3IM37xlaDvcXY= X-Google-Smtp-Source: AGHT+IFw89EQglQbYLoq6RMFjmo60nXoAaCOzwJJ9JEqLCXxJQB8c4MR1EqLt2QmCeiBf799IgV68Q== X-Received: by 2002:a05:6000:1849:b0:32f:995b:41d3 with SMTP id c9-20020a056000184900b0032f995b41d3mr5398781wri.32.1700048720750; Wed, 15 Nov 2023 03:45:20 -0800 (PST) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id j7-20020a5d6187000000b0032dc74c093dsm10414998wru.103.2023.11.15.03.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 03:45:19 -0800 (PST) From: luca.boccassi@gmail.com To: Hernan Vargas Cc: Maxime Coquelin , dpdk stable Subject: patch 'test/bbdev: fix Python script subprocess' has been queued to stable release 20.11.10 Date: Wed, 15 Nov 2023 11:45:01 +0000 Message-Id: <20231115114515.2355140-2-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231115114515.2355140-1-luca.boccassi@gmail.com> References: <20231108192535.922238-37-luca.boccassi@gmail.com> <20231115114515.2355140-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.10 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/17/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/f1b0814307fa96bc085528ab22e5590fee445ca1 Thanks. Luca Boccassi --- >From f1b0814307fa96bc085528ab22e5590fee445ca1 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 @@ -91,21 +91,18 @@ for vector in args.test_vector: params_string = " ".join(call_params) 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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-15 11:44:13.692152203 +0000 +++ 0002-test-bbdev-fix-Python-script-subprocess.patch 2023-11-15 11:44:13.522386553 +0000 @@ -1 +1 @@ -From 262c9d13f7c998fdca526b28871f37b47fbbb464 Mon Sep 17 00:00:00 2001 +From f1b0814307fa96bc085528ab22e5590fee445ca1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 262c9d13f7c998fdca526b28871f37b47fbbb464 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org