[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: Re: [OE-core][PATCH v4] libevent: mark util/monotonic_prc_fallback as retriable
From: "Alexander Kanavin" <alex.kanavin () gmail ! com>
Date: 2021-09-30 14:29:49
Message-ID: CANNYZj_99ChPmn+ogGwQ4xrmDog9DCfEh1HXBgLpGzLZeY7uPQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Neither the syntax was fixed, nor the other patch was submitted upstream.
Alex
On Thu, 30 Sept 2021 at 16:21, Thomas Perrot <thomas.perrot@bootlin.com>
wrote:
> Hello,
>
> On Thu, 2021-09-30 at 16:11 +0200, Alexander Kanavin wrote:
> > How is this different to the previous patch submission?
> >
>
> I have indicated where patch 0003 comes from in the upstream status.
>
> Was there any other change to make?
>
> Best regards,
> Thomas
>
> > Alex
> >
> > On Thu, 30 Sept 2021 at 16:08, Thomas Perrot <
> > thomas.perrot@bootlin.com> wrote:
> > > Backport a patch to fix the below ptest failure:
> > > # ./run-ptest
> > > Running tests:
> > > EVPORT
> > > Skipping test
> > > KQUEUE
> > > Skipping test
> > > EPOLL
> > > test-eof: OKAY
> > > test-dumpevents: OKAY (output not checked)
> > > regress:
> > > FAIL ../libevent-2.1.12-stable/test/regress_util.c:1478:
> > > assert(diff.tv_sec == 0): 1 vs 0 util/monotonic_prc_fallback:
> > > [monotonic_prc_fallback FAILED]
> > > 1/312 TESTS FAILED. (33 skipped)
> > > FAILED
> > > regress_debug:
> > > FAIL ../libevent-2.1.12-stable/test/regress_util.c:1478:
> > > assert(diff.tv_sec == 0): 1 vs 0 util/monotonic_prc_fallback:
> > > [monotonic_prc_fallback FAILED]
> > > 1/312 TESTS FAILED. (33 skipped)
> > > FAILED
> > > [snip]
> > >
> > > (From OE-Core rev: edecbbdacab5227c75e4a199e124389f8036b421)
> > >
> > > [YOCTO #14507]
> > >
> > > Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> > > Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > > Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
> > > ---
> > > ...-monotonic_prc_fallback-as-retriable.patch | 28 +++++++
> > > ...ts-are-marked-failed-only-when-all-a.patch | 81
> > > +++++++++++++++++++
> > > .../libevent/libevent/run-ptest | 10 +--
> > > .../libevent/libevent_2.1.12.bb | 4 +-
> > > 4 files changed, 117 insertions(+), 6 deletions(-)
> > > create mode 100644 meta/recipes-support/libevent/libevent/0003-test-
> > > mark-util-monotonic_prc_fallback-as-retriable.patch
> > > create mode 100644 meta/recipes-support/libevent/libevent/0004-test-
> > > retriable-tests-are-marked-failed-only-when-all-a.patch
> > >
> > > diff --git a/meta/recipes-support/libevent/libevent/0003-test-mark-
> > > util-monotonic_prc_fallback-as-retriable.patch b/meta/recipes-
> > > support/libevent/libevent/0003-test-mark-util-monotonic_prc_fallback-
> > > as-retriable.patch
> > > new file mode 100644
> > > index 000000000000..ea322511d7e9
> > > --- /dev/null
> > > +++ b/meta/recipes-support/libevent/libevent/0003-test-mark-util-
> > > monotonic_prc_fallback-as-retriable.patch
> > > @@ -0,0 +1,28 @@
> > > +From 5a9a5faf27d85c89b40fb610cd23a4b62a7dbf0e Mon Sep 17 00:00:00
> > > 2001
> > > +From: Azat Khuzhin <azat@libevent.org>
> > > +Date: Sun, 19 Sep 2021 00:57:31 +0300
> > > +Subject: [PATCH] test: mark util/monotonic_prc_fallback as retriable
> > > +
> > > +Refs: #1193
> > > +
> > > +Upstream-status: Backported
> > > [
> > >
> https://github.com/libevent/libevent/commit/04fcd7c6df158bb65261867de4b9ec8439696934
> > > ]
> > > +---
> > > + test/regress_util.c | 2 +-
> > > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > > +
> > > +diff --git a/test/regress_util.c b/test/regress_util.c
> > > +index 45caa2700a40..a9e80db20149 100644
> > > +--- a/test/regress_util.c
> > > ++++ b/test/regress_util.c
> > > +@@ -1672,7 +1672,7 @@ struct testcase_t util_testcases[] = {
> > > + { "monotonic_res_fallback", test_evutil_monotonic_res,
> > > TT_OFF_BY_DEFAULT, &basic_setup, (void*)"fallback" },
> > > + { "monotonic_prc", test_evutil_monotonic_prc, 0,
> > > &basic_setup, (void*)"" },
> > > + { "monotonic_prc_precise", test_evutil_monotonic_prc,
> > > TT_RETRIABLE, &basic_setup, (void*)"precise" },
> > > +- { "monotonic_prc_fallback", test_evutil_monotonic_prc, 0,
> > > &basic_setup, (void*)"fallback" },
> > > ++ { "monotonic_prc_fallback", test_evutil_monotonic_prc,
> > > TT_RETRIABLE, &basic_setup, (void*)"fallback" },
> > > + { "date_rfc1123", test_evutil_date_rfc1123, 0, NULL, NULL },
> > > + { "evutil_v4addr_is_local", test_evutil_v4addr_is_local, 0,
> > > NULL, NULL },
> > > + { "evutil_v6addr_is_local", test_evutil_v6addr_is_local, 0,
> > > NULL, NULL },
> > > +--
> > > +2.31.1
> > > +
> > > diff --git a/meta/recipes-support/libevent/libevent/0004-test-
> > > retriable-tests-are-marked-failed-only-when-all-a.patch
> > > b/meta/recipes-support/libevent/libevent/0004-test-retriable-tests-
> > > are-marked-failed-only-when-all-a.patch
> > > new file mode 100644
> > > index 000000000000..ae7db0b7aa85
> > > --- /dev/null
> > > +++ b/meta/recipes-support/libevent/libevent/0004-test-retriable-
> > > tests-are-marked-failed-only-when-all-a.patch
> > > @@ -0,0 +1,81 @@
> > > +From 36ebd92fa53c0097f1e2f9ec5aa5b5c6ec1b411d Mon Sep 17 00:00:00
> > > 2001
> > > +From: Thomas Perrot <thomas.perrot@bootlin.com>
> > > +Date: Wed, 29 Sep 2021 13:50:35 +0200
> > > +Subject: [PATCH] test: retriable tests are marked failed only when
> > > all
> > > + attempts have failed
> > > +
> > > +Fixes: #1193
> > > +
> > > +Upstream-status: Pending
> > > +
> > > +Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
> > > +---
> > > + test/tinytest.c | 13 ++++++-------
> > > + test/tinytest.h | 2 +-
> > > + 2 files changed, 7 insertions(+), 8 deletions(-)
> > > +
> > > +diff --git a/test/tinytest.c b/test/tinytest.c
> > > +index 85dfe74a720e..bf2882418eb6 100644
> > > +--- a/test/tinytest.c
> > > ++++ b/test/tinytest.c
> > > +@@ -310,7 +310,8 @@ testcase_run_forked_(const struct testgroup_t
> > > *group,
> > > +
> > > + int
> > > + testcase_run_one(const struct testgroup_t *group,
> > > +- const struct testcase_t *testcase)
> > > ++ const struct testcase_t *testcase,
> > > ++ const int test_attempts)
> > > + {
> > > + enum outcome outcome;
> > > +
> > > +@@ -348,7 +349,7 @@ testcase_run_one(const struct testgroup_t
> > > *group,
> > > + if (opt_verbosity>0 && !opt_forked)
> > > + puts("SKIPPED");
> > > + } else {
> > > +- if (!opt_forked)
> > > ++ if (!opt_forked && (testcase->flags & TT_RETRIABLE)
> > > && !test_attempts)
> > > + printf("\n [%s FAILED]\n", testcase->name);
> > > + }
> > > +
> > > +@@ -525,22 +526,20 @@ tinytest_main(int c, const char **v, struct
> > > testgroup_t *groups)
> > > + struct testgroup_t *group = &groups[i];
> > > + for (j = 0; group->cases[j].name; ++j) {
> > > + struct testcase_t *testcase = &group-
> > > > cases[j];
> > > +- int test_attempts = 3;
> > > ++ int test_attempts = (testcase->flags &
> > > TT_RETRIABLE) ? 3: 1;
> > > + int test_ret_err;
> > > +
> > > + if (!(testcase->flags & TT_ENABLED_))
> > > + continue;
> > > +
> > > + for (;;) {
> > > +- test_ret_err =
> > > testcase_run_one(group, testcase);
> > > ++ test_ret_err =
> > > testcase_run_one(group, testcase, test_attempts);
> > > +
> > > + if (test_ret_err == OK)
> > > + break;
> > > +- if (!(testcase->flags &
> > > TT_RETRIABLE))
> > > ++ if (!--test_attempts)
> > > + break;
> > > + printf("\n [RETRYING %s (%i)]\n",
> > > testcase->name, test_attempts);
> > > +- if (!test_attempts--)
> > > +- break;
> > > + }
> > > +
> > > + switch (test_ret_err) {
> > > +diff --git a/test/tinytest.h b/test/tinytest.h
> > > +index d321dd467542..c276b5339331 100644
> > > +--- a/test/tinytest.h
> > > ++++ b/test/tinytest.h
> > > +@@ -92,7 +92,7 @@ char *tinytest_format_hex_(const void *, unsigned
> > > long);
> > > + tinytest_set_flag_(groups, named, 1, TT_SKIP)
> > > +
> > > + /** Run a single testcase in a single group. */
> > > +-int testcase_run_one(const struct testgroup_t *,const struct
> > > testcase_t *);
> > > ++int testcase_run_one(const struct testgroup_t *,const struct
> > > testcase_t *, const int test_attempts);
> > > +
> > > + void tinytest_set_aliases(const struct testlist_alias_t *aliases);
> > > +
> > > +--
> > > +2.31.1
> > > +
> > > diff --git a/meta/recipes-support/libevent/libevent/run-ptest
> > > b/meta/recipes-support/libevent/libevent/run-ptest
> > > index d3b5e793c3c5..ef4260d1c413 100644
> > > --- a/meta/recipes-support/libevent/libevent/run-ptest
> > > +++ b/meta/recipes-support/libevent/libevent/run-ptest
> > > @@ -1,14 +1,14 @@
> > > #!/bin/sh
> > >
> > > # run-ptest - 'ptest' test infrastructure shell script that
> > > -# wraps the libevent test scripts
> > > +# wraps the libevent test scripts
> > > #
> > > # Trevor Gamblin <trevor.gamblin@windriver.com>
> > > ###############################################################
> > > LIBEVENTLIB=@libdir@/libevent
> > > LOG="${LIBEVENTLIB}/ptest/libevent_ptest_$(date +%Y%m%d-%H%M%S).log"
> > >
> > > -cd ${LIBEVENTLIB}/ptest
> > > +cd ${LIBEVENTLIB}/ptest
> > >
> > > # Run only the libevent "regress" test. All other test scripts in
> > > the
> > > # libevent "test" folder are related to performance, e.g. read/write
> > > @@ -16,9 +16,9 @@ cd ${LIBEVENTLIB}/ptest
> > > # in the ptest log.
> > > ./test/regress 2>&1| sed -e '/TESTS/d' -e '/tests/d' -e '/OK/
> > > s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /SKIPPED/ s/^/SKIP: / ;
> > > /DISABLED/ s/^/SKIP: /' | cut -f1,2 -d ':' | tee -a ${LOG}
> > >
> > > -passed=`grep PASS ${LOG}|wc -l`
> > > -failed=`grep FAIL ${LOG}|wc -l`
> > > -skipped=`grep -E SKIP ${LOG}|wc -l`
> > > +passed=`grep PASS: ${LOG}|wc -l`
> > > +failed=`grep FAIL: ${LOG}|wc -l`
> > > +skipped=`grep -E SKIP: ${LOG}|wc -l`
> > > all=$((passed + failed + skipped))
> > >
> > > ( echo "=== Test Summary ==="
> > > diff --git a/meta/recipes-support/libevent/libevent_2.1.12.bb
> > > b/meta/recipes-support/libevent/libevent_2.1.12.bb
> > > index 4b419eab226d..e26e8a9b5725 100644
> > > --- a/meta/recipes-support/libevent/libevent_2.1.12.bb
> > > +++ b/meta/recipes-support/libevent/libevent_2.1.12.bb
> > > @@ -16,6 +16,8 @@ SRC_URI =
> > > "
> > > https://github.com/libevent/libevent/releases/download/release-${PV}-
> > > file://run-ptest \
> > > file://0001-test-regress_dns.c-patch-out-tests-that-
> > > require-a-wo.patch \
> > > file://0002-test-regress.h-Increase-default-timeval-
> > > tolerance-50.patch \
> > > + file://0003-test-mark-util-monotonic_prc_fallback-as-
> > > retriable.patch \
> > > + file://0004-test-retriable-tests-are-marked-failed-only-
> > > when-all-a.patch \
> > > "
> > >
> > > SRC_URI[sha256sum] =
> > > "92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb"
> > > @@ -56,7 +58,7 @@ do_install_ptest() {
> > > do
> > > install -m 0755 $file ${D}${PTEST_PATH}/test
> > > done
> > > -
> > > +
> > > # handle multilib
> > > sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
> > > }
>
> --
> Thomas Perrot, Bootlin
> Embedded Linux and kernel engineering
> https://bootlin.com
>
>
[Attachment #5 (text/html)]
<div dir="ltr"><div>Neither the syntax was fixed, nor the other patch was submitted \
upstream.</div><div><br></div><div>Alex<br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 30 Sept 2021 at 16:21, \
Thomas Perrot <<a \
href="mailto:thomas.perrot@bootlin.com">thomas.perrot@bootlin.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br> <br>
On Thu, 2021-09-30 at 16:11 +0200, Alexander Kanavin wrote:<br>
> How is this different to the previous patch submission?<br>
> <br>
<br>
I have indicated where patch 0003 comes from in the upstream status.<br>
<br>
Was there any other change to make?<br>
<br>
Best regards,<br>
Thomas<br>
<br>
> Alex<br>
> <br>
> On Thu, 30 Sept 2021 at 16:08, Thomas Perrot <<br>
> <a href="mailto:thomas.perrot@bootlin.com" \
target="_blank">thomas.perrot@bootlin.com</a>> wrote:<br> > > Backport a \
patch to fix the below ptest failure:<br> > > # ./run-ptest<br>
> > Running tests:<br>
> > EVPORT<br>
> > Skipping test<br>
> > KQUEUE<br>
> > Skipping test<br>
> > EPOLL<br>
> > test-eof: OKAY<br>
> > test-dumpevents: OKAY (output not checked)<br>
> > regress:<br>
> > FAIL ../libevent-2.1.12-stable/test/regress_util.c:1478:<br>
> > assert(diff.tv_sec == 0): 1 vs 0 util/monotonic_prc_fallback:<br>
> > [monotonic_prc_fallback FAILED]<br>
> > 1/312 TESTS FAILED. (33 skipped)<br>
> > FAILED<br>
> > regress_debug:<br>
> > FAIL ../libevent-2.1.12-stable/test/regress_util.c:1478:<br>
> > assert(diff.tv_sec == 0): 1 vs 0 util/monotonic_prc_fallback:<br>
> > [monotonic_prc_fallback FAILED]<br>
> > 1/312 TESTS FAILED. (33 skipped)<br>
> > FAILED<br>
> > [snip]<br>
> > <br>
> > (From OE-Core rev: edecbbdacab5227c75e4a199e124389f8036b421)<br>
> > <br>
> > [YOCTO #14507]<br>
> > <br>
> > Signed-off-by: Mingli Yu <<a href="mailto:mingli.yu@windriver.com" \
target="_blank">mingli.yu@windriver.com</a>><br> > > Signed-off-by: \
Alexandre Belloni <<a href="mailto:alexandre.belloni@bootlin.com" \
target="_blank">alexandre.belloni@bootlin.com</a>><br> > > Signed-off-by: \
Thomas Perrot <<a href="mailto:thomas.perrot@bootlin.com" \
target="_blank">thomas.perrot@bootlin.com</a>><br> > > ---<br>
> > ...-monotonic_prc_fallback-as-retriable.patch | 28 +++++++<br>
> > ...ts-are-marked-failed-only-when-all-a.patch | 81<br>
> > +++++++++++++++++++<br>
> > .../libevent/libevent/run-ptest | 10 +--<br>
> > .../libevent/<a href="http://libevent_2.1.12.bb" rel="noreferrer" \
target="_blank">libevent_2.1.12.bb</a> | 4 +-<br> > > \
4 files changed, 117 insertions(+), 6 deletions(-)<br> > > create mode 100644 \
meta/recipes-support/libevent/libevent/0003-test-<br> > > \
mark-util-monotonic_prc_fallback-as-retriable.patch<br> > > create mode \
100644 meta/recipes-support/libevent/libevent/0004-test-<br> > > \
retriable-tests-are-marked-failed-only-when-all-a.patch<br> > > <br>
> > diff --git a/meta/recipes-support/libevent/libevent/0003-test-mark-<br>
> > util-monotonic_prc_fallback-as-retriable.patch b/meta/recipes-<br>
> > support/libevent/libevent/0003-test-mark-util-monotonic_prc_fallback-<br>
> > as-retriable.patch<br>
> > new file mode 100644<br>
> > index 000000000000..ea322511d7e9<br>
> > --- /dev/null<br>
> > +++ b/meta/recipes-support/libevent/libevent/0003-test-mark-util-<br>
> > monotonic_prc_fallback-as-retriable.patch<br>
> > @@ -0,0 +1,28 @@<br>
> > +From 5a9a5faf27d85c89b40fb610cd23a4b62a7dbf0e Mon Sep 17 00:00:00<br>
> > 2001<br>
> > +From: Azat Khuzhin <<a href="mailto:azat@libevent.org" \
target="_blank">azat@libevent.org</a>><br> > > +Date: Sun, 19 Sep 2021 \
00:57:31 +0300<br> > > +Subject: [PATCH] test: mark util/monotonic_prc_fallback \
as retriable<br> > > +<br>
> > +Refs: #1193<br>
> > +<br>
> > +Upstream-status: Backported<br>
> > [<br>
> > <a href="https://github.com/libevent/libevent/commit/04fcd7c6df158bb65261867de4b9ec8439696934" \
rel="noreferrer" target="_blank">https://github.com/libevent/libevent/commit/04fcd7c6df158bb65261867de4b9ec8439696934</a><br>
> > ]<br>
> > +---<br>
> > + test/regress_util.c | 2 +-<br>
> > + 1 file changed, 1 insertion(+), 1 deletion(-)<br>
> > +<br>
> > +diff --git a/test/regress_util.c b/test/regress_util.c<br>
> > +index 45caa2700a40..a9e80db20149 100644<br>
> > +--- a/test/regress_util.c<br>
> > ++++ b/test/regress_util.c<br>
> > +@@ -1672,7 +1672,7 @@ struct testcase_t util_testcases[] = {<br>
> > + { "monotonic_res_fallback", \
test_evutil_monotonic_res,<br> > > TT_OFF_BY_DEFAULT, &basic_setup, \
(void*)"fallback" },<br> > > + { "monotonic_prc", \
test_evutil_monotonic_prc, 0,<br> > > &basic_setup, (void*)"" \
},<br> > > + { "monotonic_prc_precise", \
test_evutil_monotonic_prc,<br> > > TT_RETRIABLE, &basic_setup, \
(void*)"precise" },<br> > > +- { \
"monotonic_prc_fallback", test_evutil_monotonic_prc, 0,<br> > > \
&basic_setup, (void*)"fallback" },<br> > > ++ { \
"monotonic_prc_fallback", test_evutil_monotonic_prc,<br> > > \
TT_RETRIABLE, &basic_setup, (void*)"fallback" },<br> > > + \
{ "date_rfc1123", test_evutil_date_rfc1123, 0, NULL, NULL },<br> > > \
+ { "evutil_v4addr_is_local", test_evutil_v4addr_is_local, 0,<br> \
> > NULL, NULL },<br> > > + { \
"evutil_v6addr_is_local", test_evutil_v6addr_is_local, 0,<br> > > \
NULL, NULL },<br> > > +-- <br>
> > +2.31.1<br>
> > +<br>
> > diff --git a/meta/recipes-support/libevent/libevent/0004-test-<br>
> > retriable-tests-are-marked-failed-only-when-all-a.patch<br>
> > b/meta/recipes-support/libevent/libevent/0004-test-retriable-tests-<br>
> > are-marked-failed-only-when-all-a.patch<br>
> > new file mode 100644<br>
> > index 000000000000..ae7db0b7aa85<br>
> > --- /dev/null<br>
> > +++ b/meta/recipes-support/libevent/libevent/0004-test-retriable-<br>
> > tests-are-marked-failed-only-when-all-a.patch<br>
> > @@ -0,0 +1,81 @@<br>
> > +From 36ebd92fa53c0097f1e2f9ec5aa5b5c6ec1b411d Mon Sep 17 00:00:00<br>
> > 2001<br>
> > +From: Thomas Perrot <<a href="mailto:thomas.perrot@bootlin.com" \
target="_blank">thomas.perrot@bootlin.com</a>><br> > > +Date: Wed, 29 Sep \
2021 13:50:35 +0200<br> > > +Subject: [PATCH] test: retriable tests are marked \
failed only when<br> > > all<br>
> > + attempts have failed<br>
> > +<br>
> > +Fixes: #1193<br>
> > +<br>
> > +Upstream-status: Pending<br>
> > +<br>
> > +Signed-off-by: Thomas Perrot <<a \
href="mailto:thomas.perrot@bootlin.com" \
target="_blank">thomas.perrot@bootlin.com</a>><br> > > +---<br>
> > + test/tinytest.c | 13 ++++++-------<br>
> > + test/tinytest.h | 2 +-<br>
> > + 2 files changed, 7 insertions(+), 8 deletions(-)<br>
> > +<br>
> > +diff --git a/test/tinytest.c b/test/tinytest.c<br>
> > +index 85dfe74a720e..bf2882418eb6 100644<br>
> > +--- a/test/tinytest.c<br>
> > ++++ b/test/tinytest.c<br>
> > +@@ -310,7 +310,8 @@ testcase_run_forked_(const struct testgroup_t<br>
> > *group,<br>
> > + <br>
> > + int<br>
> > + testcase_run_one(const struct testgroup_t *group,<br>
> > +- const struct testcase_t *testcase)<br>
> > ++ const struct testcase_t *testcase,<br>
> > ++ const int test_attempts)<br>
> > + {<br>
> > + enum outcome outcome;<br>
> > + <br>
> > +@@ -348,7 +349,7 @@ testcase_run_one(const struct testgroup_t<br>
> > *group,<br>
> > + if (opt_verbosity>0 && !opt_forked)<br>
> > + puts("SKIPPED");<br>
> > + } else {<br>
> > +- if (!opt_forked)<br>
> > ++ if (!opt_forked && (testcase->flags & \
TT_RETRIABLE)<br> > > && !test_attempts)<br>
> > + printf("\n [%s FAILED]\n", \
testcase->name);<br> > > + }<br>
> > + <br>
> > +@@ -525,22 +526,20 @@ tinytest_main(int c, const char **v, struct<br>
> > testgroup_t *groups)<br>
> > + struct testgroup_t *group = &groups[i];<br>
> > + for (j = 0; group->cases[j].name; ++j) {<br>
> > + struct testcase_t *testcase = \
&group-<br> > > > cases[j];<br>
> > +- int test_attempts = 3;<br>
> > ++ int test_attempts = (testcase->flags \
&<br> > > TT_RETRIABLE) ? 3: 1;<br>
> > + int test_ret_err;<br>
> > + <br>
> > + if (!(testcase->flags & \
TT_ENABLED_))<br> > > + \
continue;<br> > > + <br>
> > + for (;;) {<br>
> > +- test_ret_err =<br>
> > testcase_run_one(group, testcase);<br>
> > ++ test_ret_err =<br>
> > testcase_run_one(group, testcase, test_attempts);<br>
> > + <br>
> > + if (test_ret_err == OK)<br>
> > + break;<br>
> > +- if (!(testcase->flags \
&<br> > > TT_RETRIABLE))<br>
> > ++ if (!--test_attempts)<br>
> > + break;<br>
> > + printf("\n [RETRYING \
%s (%i)]\n",<br> > > testcase->name, test_attempts);<br>
> > +- if (!test_attempts--)<br>
> > +- break;<br>
> > + }<br>
> > + <br>
> > + switch (test_ret_err) {<br>
> > +diff --git a/test/tinytest.h b/test/tinytest.h<br>
> > +index d321dd467542..c276b5339331 100644<br>
> > +--- a/test/tinytest.h<br>
> > ++++ b/test/tinytest.h<br>
> > +@@ -92,7 +92,7 @@ char *tinytest_format_hex_(const void *, unsigned<br>
> > long);<br>
> > + tinytest_set_flag_(groups, named, 1, TT_SKIP)<br>
> > + <br>
> > + /** Run a single testcase in a single group. */<br>
> > +-int testcase_run_one(const struct testgroup_t *,const struct<br>
> > testcase_t *);<br>
> > ++int testcase_run_one(const struct testgroup_t *,const struct<br>
> > testcase_t *, const int test_attempts);<br>
> > + <br>
> > + void tinytest_set_aliases(const struct testlist_alias_t *aliases);<br>
> > + <br>
> > +-- <br>
> > +2.31.1<br>
> > +<br>
> > diff --git a/meta/recipes-support/libevent/libevent/run-ptest<br>
> > b/meta/recipes-support/libevent/libevent/run-ptest<br>
> > index d3b5e793c3c5..ef4260d1c413 100644<br>
> > --- a/meta/recipes-support/libevent/libevent/run-ptest<br>
> > +++ b/meta/recipes-support/libevent/libevent/run-ptest<br>
> > @@ -1,14 +1,14 @@<br>
> > #!/bin/sh<br>
> > <br>
> > # run-ptest - 'ptest' test infrastructure shell script that<br>
> > -# wraps the libevent test scripts <br>
> > +# wraps the libevent test scripts<br>
> > #<br>
> > # Trevor Gamblin <<a href="mailto:trevor.gamblin@windriver.com" \
target="_blank">trevor.gamblin@windriver.com</a>><br> > > \
###############################################################<br> > > \
LIBEVENTLIB=@libdir@/libevent<br> > > \
LOG="${LIBEVENTLIB}/ptest/libevent_ptest_$(date +%Y%m%d-%H%M%S).log"<br> \
> > <br> > > -cd ${LIBEVENTLIB}/ptest <br>
> > +cd ${LIBEVENTLIB}/ptest<br>
> > <br>
> > # Run only the libevent "regress" test. All other test scripts \
in<br> > > the<br>
> > # libevent "test" folder are related to performance, e.g. \
read/write<br> > > @@ -16,9 +16,9 @@ cd ${LIBEVENTLIB}/ptest<br>
> > # in the ptest log.<br>
> > ./test/regress 2>&1| sed -e '/TESTS/d' -e \
'/tests/d' -e '/OK/<br> > > s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; \
/SKIPPED/ s/^/SKIP: / ;<br> > > /DISABLED/ s/^/SKIP: /' | cut -f1,2 -d \
':' | tee -a ${LOG}<br> > > <br>
> > -passed=`grep PASS ${LOG}|wc -l`<br>
> > -failed=`grep FAIL ${LOG}|wc -l`<br>
> > -skipped=`grep -E SKIP ${LOG}|wc -l`<br>
> > +passed=`grep PASS: ${LOG}|wc -l`<br>
> > +failed=`grep FAIL: ${LOG}|wc -l`<br>
> > +skipped=`grep -E SKIP: ${LOG}|wc -l`<br>
> > all=$((passed + failed + skipped))<br>
> > <br>
> > ( echo "=== Test Summary ==="<br>
> > diff --git a/meta/recipes-support/libevent/<a \
href="http://libevent_2.1.12.bb" rel="noreferrer" \
target="_blank">libevent_2.1.12.bb</a><br> > > \
b/meta/recipes-support/libevent/<a href="http://libevent_2.1.12.bb" rel="noreferrer" \
target="_blank">libevent_2.1.12.bb</a><br> > > index 4b419eab226d..e26e8a9b5725 \
100644<br> > > --- a/meta/recipes-support/libevent/<a \
href="http://libevent_2.1.12.bb" rel="noreferrer" \
target="_blank">libevent_2.1.12.bb</a><br> > > +++ \
b/meta/recipes-support/libevent/<a href="http://libevent_2.1.12.bb" rel="noreferrer" \
target="_blank">libevent_2.1.12.bb</a><br> > > @@ -16,6 +16,8 @@ SRC_URI =<br>
> > "<br>
> > <a href="https://github.com/libevent/libevent/releases/download/release-$%7BPV%7D-" \
rel="noreferrer" target="_blank">https://github.com/libevent/libevent/releases/download/release-${PV}-</a><br>
> > file://run-ptest \<br>
> > file://0001-test-regress_dns.c-patch-out-tests-that-<br>
> > require-a-wo.patch \<br>
> > file://0002-test-regress.h-Increase-default-timeval-<br>
> > tolerance-50.patch \<br>
> > + file://0003-test-mark-util-monotonic_prc_fallback-as-<br>
> > retriable.patch \<br>
> > + \
file://0004-test-retriable-tests-are-marked-failed-only-<br> > > \
when-all-a.patch \<br> > > "<br>
> > <br>
> > SRC_URI[sha256sum] =<br>
> > "92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb"<br>
> > @@ -56,7 +58,7 @@ do_install_ptest() {<br>
> > do<br>
> > install -m 0755 $file ${D}${PTEST_PATH}/test<br>
> > done<br>
> > - <br>
> > +<br>
> > # handle multilib<br>
> > sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest<br>
> > }<br>
<br>
-- <br>
Thomas Perrot, Bootlin<br>
Embedded Linux and kernel engineering<br>
<a href="https://bootlin.com" rel="noreferrer" \
target="_blank">https://bootlin.com</a><br> <br>
</blockquote></div>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156504): https://lists.openembedded.org/g/openembedded-core/message/156504
Mute This Topic: https://lists.openembedded.org/mt/85974461/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic