* [PATCH v2] sstatetests: limit the number of signature comparisons when differ
@ 2017-08-07 21:00 leonardo.sandoval.gonzalez
2017-08-07 21:01 ` ✗ patchtest: failure for " Patchwork
0 siblings, 1 reply; 3+ messages in thread
From: leonardo.sandoval.gonzalez @ 2017-08-07 21:00 UTC (permalink / raw)
To: openembedded-core
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
For perfomance reasons, limit the number of signature comparisons when
stamps differ. The limit set is hardcoded to 20.
[YOCTO #11651]
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
---
meta/lib/oeqa/selftest/cases/sstatetests.py | 41 +++++++++++++++++++----------
1 file changed, 27 insertions(+), 14 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 0b36027918..05a919b320 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -458,6 +458,26 @@ http_proxy = "http://example.com/"
base = os.sep.join(root.rsplit(os.sep, 2)[-2:] + [name])
f[base] = shash
return f
+
+ def compare_sigfiles(files, files1, files2, compare=False):
+ for k in files1 | files2:
+ if k in files1 and k in files2:
+ i_sigfile += 1
+ print("%s differs:" % k)
+ if compare:
+ sigdatafile1 = self.topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k]
+ sigdatafile2 = self.topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]
+ output = bb.siggen.compare_sigfiles(sigdatafile1, sigdatafile2)
+ if output:
+ print('\n'.join(output))
+ elif k in files1 and k not in files2:
+ print("%s in files1" % k)
+ elif k not in files1 and k in files2:
+ print("%s in files2" % k)
+ else:
+ assert "shouldn't reach here"
+
+
files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps/")
files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps/")
# Remove items that are identical in both sets
@@ -468,18 +488,11 @@ http_proxy = "http://example.com/"
# No changes, so we're done
return
- for k in files1.keys() | files2.keys():
- if k in files1 and k in files2:
- print("%s differs:" % k)
- sigdatafile1 = self.topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k]
- sigdatafile2 = self.topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]
- output = bb.siggen.compare_sigfiles(sigdatafile1, sigdatafile2)
- if output:
- print('\n'.join(output))
- elif k in files1 and k not in files2:
- print("%s in files1" % k)
- elif k not in files1 and k in files2:
- print("%s in files2" % k)
- else:
- assert "shouldn't reach here"
+ files = list(files1.keys() | files2.keys())
+ # this is an expensive computation, thus just compare the first 'max_sigfiles_to_compare' k files
+ max_sigfiles_to_compare = 20
+ first, rest = files[:max_sigfiles_to_compare], files[max_sigfiles_to_compare:]
+ compare_sigfiles(first, files1.keys(), files2.keys(), compare=True)
+ compare_sigfiles(rest, files1.keys(), files2.keys(), compare=False)
+
self.fail("sstate hashes not identical.")
--
2.12.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* ✗ patchtest: failure for sstatetests: limit the number of signature comparisons when differ
2017-08-07 21:00 [PATCH v2] sstatetests: limit the number of signature comparisons when differ leonardo.sandoval.gonzalez
@ 2017-08-07 21:01 ` Patchwork
2017-08-07 21:24 ` Leonardo Sandoval
0 siblings, 1 reply; 3+ messages in thread
From: Patchwork @ 2017-08-07 21:01 UTC (permalink / raw)
To: Leonardo Sandoval; +Cc: openembedded-core
== Series Details ==
Series: sstatetests: limit the number of signature comparisons when differ
Revision: 1
URL : https://patchwork.openembedded.org/series/8109/
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 a5bb13a5d7)
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] -> ...).
---
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] 3+ messages in thread
* Re: ✗ patchtest: failure for sstatetests: limit the number of signature comparisons when differ
2017-08-07 21:01 ` ✗ patchtest: failure for " Patchwork
@ 2017-08-07 21:24 ` Leonardo Sandoval
0 siblings, 0 replies; 3+ messages in thread
From: Leonardo Sandoval @ 2017-08-07 21:24 UTC (permalink / raw)
To: openembedded-core
This patch depends of another one (1/1) I sent in the first series and
it also has a logic error. I will send a v3.
Leo
On Mon, 2017-08-07 at 21:01 +0000, Patchwork wrote:
> == Series Details ==
>
> Series: sstatetests: limit the number of signature comparisons when differ
> Revision: 1
> URL : https://patchwork.openembedded.org/series/8109/
> 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 a5bb13a5d7)
>
>
>
> 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] -> ...).
>
> ---
> 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] 3+ messages in thread
end of thread, other threads:[~2017-08-07 21:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 21:00 [PATCH v2] sstatetests: limit the number of signature comparisons when differ leonardo.sandoval.gonzalez
2017-08-07 21:01 ` ✗ patchtest: failure for " Patchwork
2017-08-07 21:24 ` Leonardo Sandoval
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox