Skip to contentSkip to conversation

libevent: mark util/monotonic_prc_fallback as retriable

PATCH Superseded Thomas Perrot 1 participant 1 message Sep 29, 2021

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 libevent: mark util/monotonic_prc_fallback as retriable

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]

---
 ...-monotonic_prc_fallback-as-retriable.patch | 26 ++++++
 ...ts-are-marked-failed-only-when-all-a.patch | 79 +++++++++++++++++++
 .../libevent/libevent/run-ptest               | 10 +--
 .../libevent/libevent_2.1.12.bb               |  4 +-
 4 files changed, 113 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
meta/recipes-support/libevent/libevent/0003-test-mark-util-monotonic_prc_fallback-as-retriable.patch new file +26 -0
new file mode 100644
index 000000000000..2c96a24c985c
@@ -0,0 +1,26 @@
+From 04fcd7c6df158bb65261867de4b9ec8439696934 Mon Sep 17 00:00:00 2001
+From: Azat Khuzhin <[email protected]>
+Date: Sun, 19 Sep 2021 00:57:31 +0300
+Subject: [PATCH] test: mark util/monotonic_prc_fallback as retriable
+
+Refs: #1193
+---
+ 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 0f33ea0ea11c..eb362b32301f 100644
+--- a/test/regress_util.c
++++ b/test/regress_util.c
+@@ -1848,7 +1848,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
+
meta/recipes-support/libevent/libevent/0004-test-retriable-tests-are-marked-failed-only-when-all-a.patch new file +79 -0

79 lines not on this page · raw message

meta/recipes-support/libevent/libevent/run-ptest +5 -5
index d3b5e793c3c5..ef4260d1c413 100644
@@ -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 <[email protected]>
 ###############################################################
 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 ==="
meta/recipes-support/libevent/libevent_2.1.12.bb +3 -1
index 4b419eab226d..65770cb0d691 100644
@@ -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
 }
Signature · 1 line
2.31.1