From patchwork Fri Jul 28 11:13:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28071 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F851C04A94 for ; Fri, 28 Jul 2023 11:13:16 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.web11.30018.1690542795582996882 for ; Fri, 28 Jul 2023 04:13:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=exbih6ue; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.46, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-3fbea14706eso20992125e9.2 for ; Fri, 28 Jul 2023 04:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1690542793; x=1691147593; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=oniJMkN0jYjIX6IAvaSr977qphYCLC+Zj6FOsUkT8jc=; b=exbih6ueStgTUxO6DeRtqJs8XGI9kt0i4Eue0Qc3BDW5CMwifI7IMW1/snWrMRGdeA 49mXhPnGw1iaC4zq7vkPypQ1rbltBG5n9tMiIiYcP4T3X7SJYnIwtFbxU8u1O5xK5u/N DE15gn7oPPOSy/CfAQtun+YOtI6SMlqnggXh0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690542793; x=1691147593; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oniJMkN0jYjIX6IAvaSr977qphYCLC+Zj6FOsUkT8jc=; b=cP+0zKfof1iPHXKS0dKGT1rob44qIFT2JbQTbucXrx6/TbxKKzqVRse+WHS2vjLCpu aTxJvXDzHg2QooeWKIASJWiZf8eMrV9lv/a2L6slLkOWqwMt8iaR5U5cUhKas86B8iMQ ipJmJCg3c5r2wI9iyD0+KrL1uS/LnrHeJfERzX5oUugSuTGfWySluvrzHW5vrkDP1DbC JeeTBQjTVppuNXnUQFtOpQFzcweHBoIhPKozLTclcAg9drF9rsNHQQ5EuAPMaVDhhtrN U9GLQ+JMF+AFEssVZQG4KBqwX4RlDSyH5b3xS/YvvE/S1V8kDg3aw0UYEIo4PEwy3Z9v HREw== X-Gm-Message-State: ABy/qLaauJ1WXoJC2Ybt2VYrzEqi1RLYcKTO8m++jRMmcuxZnUMf1VUE gEEqc1sIjri24gn3WcZNnhGbXvqZRDfwapNbxCs= X-Google-Smtp-Source: APBJJlGhEjaljEd09QMMbeWGAf5fc/6qqNf5dN/p7v/WV/W2WgYagKvhPidC1FlPVv7RDJD0uySmXQ== X-Received: by 2002:a7b:c019:0:b0:3fd:2dcc:bc19 with SMTP id c25-20020a7bc019000000b003fd2dccbc19mr1518372wmb.15.1690542793402; Fri, 28 Jul 2023 04:13:13 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:4e39:f3a8:af2d:87a2]) by smtp.gmail.com with ESMTPSA id k17-20020a7bc311000000b003fc02218d6csm6730736wmj.25.2023.07.28.04.13.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 04:13:12 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/4] oeqa/runtime/ltp: Increase ltp test output timeout Date: Fri, 28 Jul 2023 12:13:08 +0100 Message-Id: <20230728111311.1665976-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 28 Jul 2023 11:13:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185021 On our slower arm server, the tests currently timeout leading to inconsistent test results. Increase the timeout to avoid this and aim to make the test results consistent. Signed-off-by: Richard Purdie --- meta/lib/oeqa/runtime/cases/ltp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py index 29c26d7d324..13a4f84ac00 100644 --- a/meta/lib/oeqa/runtime/cases/ltp.py +++ b/meta/lib/oeqa/runtime/cases/ltp.py @@ -71,7 +71,7 @@ class LtpTest(LtpTestBase): cmd = '/opt/ltp/runltp -f %s -q -r /opt/ltp -l /opt/ltp/results/%s -I 1 -d /opt/ltp' % (ltp_group, ltp_group) starttime = time.time() - (status, output) = self.target.run(cmd) + (status, output) = self.target.run(cmd, timeout=1200) endtime = time.time() # Write the console log to disk for convenience From patchwork Fri Jul 28 11:13:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86BB1C41513 for ; Fri, 28 Jul 2023 11:13:26 +0000 (UTC) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.groups.io with SMTP id smtpd.web10.29844.1690542796258322407 for ; Fri, 28 Jul 2023 04:13:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=MAK1ujlE; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.41, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-3fbd33a57b6so22437385e9.2 for ; Fri, 28 Jul 2023 04:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1690542794; x=1691147594; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Dn3XGKYwcIZZlXN78BwkS47xYD2U90NTdLeBAG51vDk=; b=MAK1ujlE7GtTl7YqJvkHy+dG+q2okUrYpszVRSyqjStV2yoTn6fyhQ40+2BJq9EtBc y0udjHNE1/cqp12D17DGEOMJSdgMF7AfAiG2PljeAhL/VXO60Vmqj05gLUOoLR8GNWCA MrUYabWU7e3oY1NY+a9K/48hFNcA/yFVu0A4U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690542794; x=1691147594; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dn3XGKYwcIZZlXN78BwkS47xYD2U90NTdLeBAG51vDk=; b=h1czZbdWN2FXV2R/tOB+aw5cMRD/jNyBlgV2YPjXL2NS6flTAHniUqotfB+uNO/NJL OqCg5AIqa30auee7ZY0VpqumIocN+COqlhy2m4MJHHFa9H/gUjlARhBOOMMNuHnOPoLT LKjqgbPvaIKEZEcLs51Ih5BJSXN5dX/oUPqE7+T2xn9JtH/QzzNy7EMJ+kknnROT9e9u XqNmdZuD85RLhbugX55XahcowfvHavuhxwhjD3r3yPE+SHQz+v/0trWWRbwmwLgtmJcp ciq35bdZNouFh+OeLIQSgiKKVljnZ3yksAPtXXXix09dcBMedE743zFpXjl09vjvzbpz vcxw== X-Gm-Message-State: ABy/qLbE1pwYJluhAsBBLraQT8t6jyUiJewfOrOLLKueViffbDcxu+3p 2hS0bEXpPIHywMunM+8JX0TGvIeC5+u2wvRyoIY= X-Google-Smtp-Source: APBJJlE7srR8FLEVs457Pbvv6P+aIG4h5BxPXQx7oGnoFmLgaNtoapP+wLkc7v7N+AoZPcha3HnYrw== X-Received: by 2002:a7b:ce98:0:b0:3fb:feb0:6f40 with SMTP id q24-20020a7bce98000000b003fbfeb06f40mr1658583wmj.11.1690542794039; Fri, 28 Jul 2023 04:13:14 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:4e39:f3a8:af2d:87a2]) by smtp.gmail.com with ESMTPSA id k17-20020a7bc311000000b003fc02218d6csm6730736wmj.25.2023.07.28.04.13.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 04:13:13 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/4] oeqa/ltp: Show warning for non-zero exit codes Date: Fri, 28 Jul 2023 12:13:09 +0100 Message-Id: <20230728111311.1665976-2-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230728111311.1665976-1-richard.purdie@linuxfoundation.org> References: <20230728111311.1665976-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 28 Jul 2023 11:13:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185022 When test command timeouts occur, there was no warning in the logs. Change this to ignore "exit 1" but report all other exit codes so that timeouts are clear. Signed-off-by: Richard Purdie --- meta/lib/oeqa/runtime/cases/ltp.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py index 13a4f84ac00..c7e79438a48 100644 --- a/meta/lib/oeqa/runtime/cases/ltp.py +++ b/meta/lib/oeqa/runtime/cases/ltp.py @@ -74,6 +74,11 @@ class LtpTest(LtpTestBase): (status, output) = self.target.run(cmd, timeout=1200) endtime = time.time() + # status of 1 is 'just' tests failing. 255 likely was a command output timeout + if status and status != 1: + msg = 'Command %s returned exit code %s' % (cmd, status) + self.target.logger.warning(msg) + # Write the console log to disk for convenience with open(os.path.join(self.ltptest_log_dir, "%s-raw.log" % ltp_group), 'w') as f: f.write(output) From patchwork Fri Jul 28 11:13:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28074 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87583C001E0 for ; Fri, 28 Jul 2023 11:13:26 +0000 (UTC) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mx.groups.io with SMTP id smtpd.web10.29845.1690542796810683687 for ; Fri, 28 Jul 2023 04:13:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=DTxrcbE9; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.45, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-3fe104df822so3426365e9.1 for ; Fri, 28 Jul 2023 04:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1690542795; x=1691147595; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mC5Q3CJQjfZBnzobPK/5BgFwYUIUC/+n69fLxojd9vY=; b=DTxrcbE9I0p5A+kfH9QkxNIG1zB/n/W/ybdHhsDqTm2GXbRQ0C3/UKpBSQ1a14Y9ME 2Zk/Hl4qxlmkkCepLRYvo9Ogs3dH1akmD/22Wb2h1Nssx042p6dybLfG+FL4/YkZiRFv sN+EjP0lzzmoczyyCOv1H6S8eIytWyAhRiLUg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690542795; x=1691147595; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mC5Q3CJQjfZBnzobPK/5BgFwYUIUC/+n69fLxojd9vY=; b=RRK1CZqbHUzjoFFegGerDRg+lG5nraecuoXMqUB8j07ixbBgqVMJtcskYA4wIf4pkF gwwOJ7NyTMOnp0t/1iEkhO9LtXM+1q+Igt3FCTdcVpbk0qdrR0pyRTx4XUQo6nlwmFFU dmwajnB4ivH3HE0Klh2zvrBrNbSeU9D/BEByBdeZ1cmbGWFb4OazBbax63a4822a3cEg xDwvJHdX+9EtSdd1O4aC1bIPj4628QPMYXtZh/2L1G55YE0qy5O6Lu/TXXgnPI8xjpPS 5lvNgW3K4/gQPbS1dSeM55yj0SpNfYvpxrXgq4HHNKGy2hnX5cwvw3HiLc2R/A6VeAg8 yYEA== X-Gm-Message-State: ABy/qLYJZOC3HOiWEKroKRop97Oqscudk03HnDsH9lva4jIj1kIDfYHK xA8dmwp2DeVRhSQnRM5jVr2JK2wmS2zuFN5mF1s= X-Google-Smtp-Source: APBJJlHMoLX2qCGa0WbBfQ5a2VssyjdVck/Po4HH1QzuWOjn2xgip01LMPNqGVVrkODVkweQF31g4w== X-Received: by 2002:a05:600c:2213:b0:3fd:e94f:1283 with SMTP id z19-20020a05600c221300b003fde94f1283mr1708037wml.1.1690542794823; Fri, 28 Jul 2023 04:13:14 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:4e39:f3a8:af2d:87a2]) by smtp.gmail.com with ESMTPSA id k17-20020a7bc311000000b003fc02218d6csm6730736wmj.25.2023.07.28.04.13.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 04:13:14 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/4] ltp: Add lernel loopback module dependency Date: Fri, 28 Jul 2023 12:13:10 +0100 Message-Id: <20230728111311.1665976-3-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230728111311.1665976-1-richard.purdie@linuxfoundation.org> References: <20230728111311.1665976-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 28 Jul 2023 11:13:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185023 The qemuarm64 kernel builds loopback device support as a module and it isn't included in the image leading to ltp test failures on that platform. Add the missing kernel module RRECOMMENDS to avoid this and fix those errors. Signed-off-by: Richard Purdie --- meta/recipes-extended/ltp/ltp_20230516.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-extended/ltp/ltp_20230516.bb b/meta/recipes-extended/ltp/ltp_20230516.bb index e4ba3c68724..6c97dce6c32 100644 --- a/meta/recipes-extended/ltp/ltp_20230516.bb +++ b/meta/recipes-extended/ltp/ltp_20230516.bb @@ -113,6 +113,8 @@ RDEPENDS:${PN} = "\ tar \ " +RRECOMMENDS:${PN} += "kernel-module-loop" + FILES:${PN} += "${prefix}/* ${prefix}/runtest/* ${prefix}/scenario_groups/* ${prefix}/testcases/bin/* ${prefix}/testcases/bin/*/bin/* ${prefix}/testscripts/* ${prefix}/testcases/open_posix_testsuite/* ${prefix}/testcases/open_posix_testsuite/conformance/* ${prefix}/testcases/open_posix_testsuite/Documentation/* ${prefix}/testcases/open_posix_testsuite/functional/* ${prefix}/testcases/open_posix_testsuite/include/* ${prefix}/testcases/open_posix_testsuite/scripts/* ${prefix}/testcases/open_posix_testsuite/stress/* ${prefix}/testcases/open_posix_testsuite/tools/* ${prefix}/testcases/data/nm01/lib.a ${prefix}/lib/libmem.a" # Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail From patchwork Fri Jul 28 11:13:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28072 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 862E3C001DE for ; Fri, 28 Jul 2023 11:13:26 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.groups.io with SMTP id smtpd.web10.29846.1690542797860521124 for ; Fri, 28 Jul 2023 04:13:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=VCJuK/Fx; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.48, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-3fbea14706eso20992415e9.2 for ; Fri, 28 Jul 2023 04:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1690542796; x=1691147596; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mD5AOJuikGUhVo2M1WQir+tg/leYnrRhl1HCm87O+9w=; b=VCJuK/FxAlq5k5sJJUwuUWazQRcpvyOPJgH3JCopgKJ205hkwoyL++JBI8L7Z3iiiO ub81zpJPQ+11MPqGrJLaXn7JRnpG7FZV4qwTv32lVOjRGMiGcm/G7GwfVBJzNntNJ+GJ 0oZc6StxLn5AUv7pHJ9gRLBtAgbbxLnYXJXJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690542796; x=1691147596; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mD5AOJuikGUhVo2M1WQir+tg/leYnrRhl1HCm87O+9w=; b=YQuvs96RMv2eMZqdVfUKGE45Oasjd3gdoEGh8gF4CUdADELA/7ii0BIo/8iVjwMesG YPEpf+6xer+RtWBMIgOfC/3MH0XhxS6PTEO1uHcAXqQhrqvEIRaNwJpIYXJ16NDHxEu9 hfeFf6H23ypZ7JDOiouADtzw7yBm1N/qgixPgP0dUDFoRTfDonOe3IsFCJIszL6EawmP HBpKxdOAe/qKnfXBF9yYx/y3O49zP+28lKEDW4O/wG2J/BC6K9suXONoAPfvFICFJN3P 0E2KWpstfhc9+nLOOt9ma7rlRALF5BdOdZ16HmNOac8ScPufalAsj4V1cFc3Mm3XeDbv 2/0Q== X-Gm-Message-State: ABy/qLbbNfCNmchuCVT4P3P2CTgDDOqD+sgSqGSlnDNU/jYihw8sJcRf N4KoxgBCA+5CexTBMbrsZYj9A4Y80Ob8Ln+2wNU= X-Google-Smtp-Source: APBJJlFo4jMp9XR7q19QULc/qc0KoN6PaukifIqovFdIBr3i77MBlB1HzSm0PBUD9TBE3MR7zVTQig== X-Received: by 2002:a7b:c7d3:0:b0:3fc:f9c:a3e2 with SMTP id z19-20020a7bc7d3000000b003fc0f9ca3e2mr1448847wmk.6.1690542795877; Fri, 28 Jul 2023 04:13:15 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:4e39:f3a8:af2d:87a2]) by smtp.gmail.com with ESMTPSA id k17-20020a7bc311000000b003fc02218d6csm6730736wmj.25.2023.07.28.04.13.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 04:13:15 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 4/4] target/ssh: Ensure exit code set for commands Date: Fri, 28 Jul 2023 12:13:11 +0100 Message-Id: <20230728111311.1665976-4-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230728111311.1665976-1-richard.purdie@linuxfoundation.org> References: <20230728111311.1665976-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 28 Jul 2023 11:13:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185024 As spotted by Joshua Watt, the returncode isn't set until .poll() or .wait() is called so we need to call this after the .kill() call. This fixes return code reporting so that timeouts for example now return an exit code when they didn't before. Signed-off-by: Richard Purdie --- meta/lib/oeqa/core/target/ssh.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py index 243e45dd99e..72ed1adbf89 100644 --- a/meta/lib/oeqa/core/target/ssh.py +++ b/meta/lib/oeqa/core/target/ssh.py @@ -265,6 +265,7 @@ def SSHCall(command, logger, timeout=None, **opts): time.sleep(5) try: process.kill() + process.wait() except OSError: logger.debug('OSError when killing process') pass @@ -287,6 +288,7 @@ def SSHCall(command, logger, timeout=None, **opts): except TimeoutExpired: try: process.kill() + process.wait() except OSError: logger.debug('OSError') pass @@ -316,6 +318,7 @@ def SSHCall(command, logger, timeout=None, **opts): # whilst running and ensure we don't leave a process behind. if process.poll() is None: process.kill() + process.wait() logger.debug('Something went wrong, killing SSH process') raise