* [PATCHv4] ltp: make copyFrom scp command non-fatal
@ 2020-08-05 18:51 Matthew
2020-08-05 19:02 ` ✗ patchtest: failure for ltp: make copyFrom scp command non-fatal (rev4) Patchwork
0 siblings, 1 reply; 5+ messages in thread
From: Matthew @ 2020-08-05 18:51 UTC (permalink / raw)
To: openembedded-core
[YOCTO #13802]
Make the scp failure non-fatal so the ltp tests continue to run and
the rest of the logs will be available to see afterwards.
Signed-off-by: Mingde (Matthew) Zeng <matthew.zeng@windriver.com>
---
meta/lib/oeqa/core/target/ssh.py | 7 +++++--
meta/lib/oeqa/runtime/cases/ltp.py | 5 +++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 090b40a814..aefb576805 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -107,13 +107,16 @@ class OESSHTarget(OETarget):
scpCmd = self.scp + [localSrc, remotePath]
return self._run(scpCmd, ignore_status=False)
- def copyFrom(self, remoteSrc, localDst):
+ def copyFrom(self, remoteSrc, localDst, warn_on_failure=False):
"""
Copy file from target.
"""
remotePath = '%s@%s:%s' % (self.user, self.ip, remoteSrc)
scpCmd = self.scp + [remotePath, localDst]
- return self._run(scpCmd, ignore_status=False)
+ (status, output) = self._run(scpCmd, ignore_status=warn_on_failure)
+ if warn_on_failure and status:
+ self.logger.warning("Copy returned non-zero exit status %d:\n%s" % (status, output))
+ return (status, output)
def copyDirTo(self, localSrc, remoteDst):
"""
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py
index 6dc5ef22ad..a66d5d13d7 100644
--- a/meta/lib/oeqa/runtime/cases/ltp.py
+++ b/meta/lib/oeqa/runtime/cases/ltp.py
@@ -78,9 +78,10 @@ class LtpTest(LtpTestBase):
# copy nice log from DUT
dst = os.path.join(self.ltptest_log_dir, "%s" % ltp_group )
remote_src = "/opt/ltp/results/%s" % ltp_group
- (status, output) = self.target.copyFrom(remote_src, dst)
+ (status, output) = self.target.copyFrom(remote_src, dst, True)
msg = 'File could not be copied. Output: %s' % output
- self.assertEqual(status, 0, msg=msg)
+ if status:
+ self.target.logger.warning(msg)
parser = LtpParser()
results, sections = parser.parse(dst)
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✗ patchtest: failure for ltp: make copyFrom scp command non-fatal (rev4)
2020-08-05 18:51 [PATCHv4] ltp: make copyFrom scp command non-fatal Matthew
@ 2020-08-05 19:02 ` Patchwork
2020-08-05 19:23 ` Matthew
0 siblings, 1 reply; 5+ messages in thread
From: Patchwork @ 2020-08-05 19:02 UTC (permalink / raw)
To: Mingde Zeng; +Cc: openembedded-core
== Series Details ==
Series: ltp: make copyFrom scp command non-fatal (rev4)
Revision: 4
URL : https://patchwork.openembedded.org/series/25475/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 10221e578f)
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ✗ patchtest: failure for ltp: make copyFrom scp command non-fatal (rev4)
2020-08-05 19:02 ` ✗ patchtest: failure for ltp: make copyFrom scp command non-fatal (rev4) Patchwork
@ 2020-08-05 19:23 ` Matthew
2020-08-05 19:52 ` [OE-core] " Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Matthew @ 2020-08-05 19:23 UTC (permalink / raw)
To: openembedded-core
My poky master is the latest commit (5e1bc3ef5a * net-tools: fix upstream version check) and my patch applies perfectly. Why is Patchwork complaining?
Patchwork <patchwork@patchwork.openembedded.org> writes:
> == Series Details ==
>
> Series: ltp: make copyFrom scp command non-fatal (rev4)
> Revision: 4
> URL : https://patchwork.openembedded.org/series/25475/
> State : failure
>
> == Summary ==
>
>
> Thank you for submitting this patch series to OpenEmbedded Core. This is
> an automated response. Several tests have been executed on the proposed
> series by patchtest resulting in the following failures:
>
>
>
> * Issue Series does not apply on top of target branch [test_series_merge_on_head]
> Suggested fix Rebase your series on top of targeted branch
> Targeted branch master (currently at 10221e578f)
>
>
>
> If you believe any of these test results are incorrect, please reply to the
> mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
> Otherwise we would appreciate you correcting the issues and submitting a new
> version of the patchset if applicable. Please ensure you add/increment the
> version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
> [PATCH v3] -> ...).
>
> ---
> Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
> Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
> Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
--
Mingde (Matthew) Zeng
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] ✗ patchtest: failure for ltp: make copyFrom scp command non-fatal (rev4)
2020-08-05 19:23 ` Matthew
@ 2020-08-05 19:52 ` Richard Purdie
2020-08-05 20:16 ` Matthew
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2020-08-05 19:52 UTC (permalink / raw)
To: Matthew, openembedded-core
On Wed, 2020-08-05 at 15:23 -0400, Matthew wrote:
> My poky master is the latest commit (5e1bc3ef5a * net-tools: fix
> upstream version check) and my patch applies perfectly. Why is
> Patchwork complaining?
FWIW I just tried to apply the patch and it doesn't apply for me :(.
(Stripping trailing CRs from patch; use --binary to disable.)
patching file meta/lib/oeqa/core/target/ssh.py
(Stripping trailing CRs from patch; use --binary to disable.)
patching file meta/lib/oeqa/runtime/cases/ltp.py
Hunk #1 FAILED at 78.
1 out of 1 hunk FAILED -- saving rejects to file meta/lib/oeqa/runtime/cases/ltp.py.rej
The difference is trailing whitespace which is present on the line:
remote_src = "/opt/ltp/results/%s" % ltp_group
but has been stripped in your patch.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] ✗ patchtest: failure for ltp: make copyFrom scp command non-fatal (rev4)
2020-08-05 19:52 ` [OE-core] " Richard Purdie
@ 2020-08-05 20:16 ` Matthew
0 siblings, 0 replies; 5+ messages in thread
From: Matthew @ 2020-08-05 20:16 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
Richard Purdie <richard.purdie@linuxfoundation.org> writes:
> On Wed, 2020-08-05 at 15:23 -0400, Matthew wrote:
>> My poky master is the latest commit (5e1bc3ef5a * net-tools: fix
>> upstream version check) and my patch applies perfectly. Why is
>> Patchwork complaining?
>
> FWIW I just tried to apply the patch and it doesn't apply for me :(.
>
> (Stripping trailing CRs from patch; use --binary to disable.)
> patching file meta/lib/oeqa/core/target/ssh.py
> (Stripping trailing CRs from patch; use --binary to disable.)
> patching file meta/lib/oeqa/runtime/cases/ltp.py
> Hunk #1 FAILED at 78.
> 1 out of 1 hunk FAILED -- saving rejects to file meta/lib/oeqa/runtime/cases/ltp.py.rej
>
> The difference is trailing whitespace which is present on the line:
>
> remote_src = "/opt/ltp/results/%s" % ltp_group
>
> but has been stripped in your patch.
Arghh, I configured automatic remove trailing whitespace on save, that must be the issue.
Patch with the whitespace sent.
>
> Cheers,
>
> Richard
--
Mingde (Matthew) Zeng
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-05 20:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-05 18:51 [PATCHv4] ltp: make copyFrom scp command non-fatal Matthew
2020-08-05 19:02 ` ✗ patchtest: failure for ltp: make copyFrom scp command non-fatal (rev4) Patchwork
2020-08-05 19:23 ` Matthew
2020-08-05 19:52 ` [OE-core] " Richard Purdie
2020-08-05 20:16 ` Matthew
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox