<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>On 9/6/19 2:51 PM, Trevor Gamblin wrote:<br>
</p>
<blockquote type="cite"
cite="mid:20190906185159.4923-1-Trevor.Gamblin@windriver.com">
<pre class="moz-quote-pre" wrap="">From: Trevor Gamblin <a class="moz-txt-link-rfc2396E" href="mailto:trevor.gamblin@windriver.com"><trevor.gamblin@windriver.com></a>
The libevent ptest used to report only a global pass or a fail result.
Count individual PASS, FAIL, SKIP results. The SKIP results now
include tests that are disabled in the libevent code.
libevent's ptest output did not comply with the automake-style output
"result: testname", and reported a FAIL status at the end of the test
run if any of the libevent tests failed. This patch makes the log
consistent with the automake style:
PASS: http/cancel_by_host_no_ns
PASS: http/cancel_inactive_server
PASS: http/cancel_by_host_no_ns_inactive_server
SKIPPED: http/cancel_by_host_server_timeout
SKIPPED: http/cancel_server_timeout
and provides a summary as follows:
=== Test Summary ===
TOTAL: 316
PASSED: 300
FAILED: 0
SKIPPED: 16
DURATION: 87
END: /usr/lib/libevent/ptest
Signed-off-by: Trevor Gamblin <a class="moz-txt-link-rfc2396E" href="mailto:trevor.gamblin@windriver.com"><trevor.gamblin@windriver.com></a>
---
.../libevent/libevent/run-ptest | 34 ++++++++++++-------
.../libevent/libevent_2.1.11.bb | 3 ++
2 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/meta/recipes-support/libevent/libevent/run-ptest b/meta/recipes-support/libevent/libevent/run-ptest
index 0241851c70..080806dea9 100644
--- a/meta/recipes-support/libevent/libevent/run-ptest
+++ b/meta/recipes-support/libevent/libevent/run-ptest
@@ -1,18 +1,28 @@
#!/bin/sh
-fail=0
+# run-ptest - 'ptest' test infrastructure shell script that
+# wraps the libevent test scripts
+#
+# Trevor Gamblin <a class="moz-txt-link-rfc2396E" href="mailto:trevor.gamblin@windriver.com"><trevor.gamblin@windriver.com></a>
+###############################################################
+LIBEVENTLIB=@libdir@/libevent
+LOG="${LIBEVENTLIB}/ptest/libevent_ptest_$(date +%Y%m%d-%H%M%S).log"
+
+cd ${LIBEVENTLIB}/ptest
+
for test in ./test/*
do
-        $test
-        if [ $? -ne 0 ]
-        then
-                fail=1
-        fi
+ $test 2>&1| sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /SKIPPED/ s/^/SKIP: / ; /DISABLED/ s/^/SKIP: /' | cut -f1,2 -d ':' | tee -a ${LOG}
done
-if [ $fail -eq 0 ]
-then
-        echo "PASS: libevent"
-else
-        echo "FAIL: libevent"
-fi
+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 ==="
+ echo "TOTAL: ${all}"
+ echo "PASSED: ${passed}"
+ echo "FAILED: ${failed}"
+ echo "SKIPPED: ${skipped}"
+) | tee -a ${LOG}
diff --git a/meta/recipes-support/libevent/libevent_2.1.11.bb b/meta/recipes-support/libevent/libevent_2.1.11.bb
index 1e18f0ab2c..f005ab8bda 100644
--- a/meta/recipes-support/libevent/libevent_2.1.11.bb
+++ b/meta/recipes-support/libevent/libevent_2.1.11.bb
@@ -43,4 +43,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
}
</pre>
</blockquote>
<p>ptest logs are currently still including some performance test
outputs in addition to the PASS/FAIL stuff we are concerned with.
That being said, I figured it'd be better to get a working patch
in to use on a test run before the weekend. Example of the
performance output below:<code></code></p>
<p><code></code><code>write callback. should only see this once</code><code><br>
</code><code>timeout fired, time to end test</code><code><br>
</code><code>usec used=80, usec passed=1501872, cpu usage=0.01%</code><code><br>
</code><code>closed_cb: detected socket close with success</code><code><br>
</code><code>=====expected</code><code><br>
</code><code>Now= 1567793437.757017</code><code><br>
</code><code>Inserted:</code><code><br>
</code><code> 0x405940 [fd 3] Write</code><code><br>
</code><code> 0x4059d0 [fd 4] Read Persist Timeout=T+1</code><code><br>
</code><code> 0x405a60 [fd 5] Write Persist Timeout=T+1</code><code><br>
</code><code> 0x405af0 [fd 6] Read Timeout=T+2.5</code><code><br>
</code><code> 0x405b80 [fd -1] Timeout=T+1</code><code><br>
</code><code> 0x405c10 [fd -1] Timeout=T+1</code><code><br>
</code><code> 0x405ca0 [fd -1] Timeout=T+1</code><code><br>
</code><code> 0x405d30 [fd -1] Persist Timeout=T+2.5</code><code><br>
</code><code> 0x405dc0 [fd -1] Persist Timeout=T+1</code><code><br>
</code><code> 0x405e50 [fd -1] Persist Timeout=T+2.5</code><code><br>
</code><code> 0x406000 [sig 2] Signal Persist</code><code><br>
</code><code>Active:</code><code><br>
</code><code> 0x405ee0 [fd -1, priority=0] Read active</code><code><br>
</code><code> 0x405f70 [fd -1, priority=0] Read Write Timeout
active</code><code><br>
</code><code> 0x4059d0 [fd 4, priority=0] Read active</code><code><br>
</code><code>======received</code><code><br>
</code><code>Inserted events:</code><code><br>
</code><code> 0x405940 [fd 3] Write</code><code><br>
</code><code> 0x4059d0 [fd 4] Read Persist
Timeout=1567793438.756966</code><code><br>
</code><code> 0x405a60 [fd 5] Write Persist
Timeout=1567793438.756966</code><code><br>
</code><code> 0x405af0 [fd 6] Read Timeout=1567793440.256966</code><code><br>
</code><code> 0x405308 [fd 8] Read Persist Internal</code><code><br>
</code><code> 0x406000 [sig 2] Signal Persist</code><code><br>
</code><code> 0x405800 [fd -1] Internal
Timeout=1567793438.756966</code><code><br>
</code><code> 0x4058b0 [fd -1] Internal
Timeout=1567793440.256966</code><code><br>
</code><code> 0x405ca0 [fd -1] Timeout=1567793438.756966</code><code><br>
</code><code> 0x405e50 [fd -1] Persist Timeout=1567793440.256966</code><code><br>
</code><code> 0x405b80 [fd -1] Timeout=1567793438.756966</code><code><br>
</code><code> 0x405c10 [fd -1] Timeout=1567793438.756966</code><code><br>
</code><code> 0x405dc0 [fd -1] Persist Timeout=1567793438.756966</code><code><br>
</code><code> 0x405d30 [fd -1] Persist Timeout=1567793440.256966</code><code><br>
</code><code>Active events:</code><code><br>
</code><code> 0x4059d0 [fd 4, priority=0] Read active</code><code><br>
</code><code> 0x405ee0 [fd -1, priority=0] Read active</code><code><br>
</code><code> 0x405f70 [fd -1, priority=0] Read Write Timeout
active</code><code><br>
</code><code>read_cb: read 12</code><code><br>
</code><code>read_cb: read 0 - means EOF</code><code><br>
</code><code>waiting for 30 conns</code><code><br>
</code><code>Average group read bucket level: 0.000000</code><code><br>
</code><code>Average group write bucket level: 0.000000</code><code><br>
</code><code>1: 683014.200000 per second</code><code><br>
</code><code>2: 4389273.600000 per second</code><code><br>
</code><code>3: 683014.200000 per second</code><code><br>
</code><code>4: 687929.400000 per second</code><code><br>
</code><code>5: 683014.200000 per second</code><code><br>
</code><code>6: 592950.200000 per second</code><code><br>
</code><code>7: 683014.200000 per second</code><code><br>
</code><code>8: 687929.400000 per second</code><code><br>
</code><code>9: 1433587.200000 per second</code><code><br>
</code><code>10: 17691353.400000 per second</code><code><br>
</code><code>11: 1433590.400000 per second</code><code><br>
</code><code>12: 17667606.200000 per second</code><code><br>
</code><code>13: 1202576.000000 per second</code><code><br>
</code><code>14: 592950.200000 per second</code><code><br>
</code><code>15: 592950.200000 per second</code><code><br>
</code><code>16: 17667606.200000 per second</code><code><br>
</code><code>17: 1199100.600000 per second</code><code><br>
</code><code>18: 16940233.600000 per second</code><code><br>
</code><code>19: 1402460.800000 per second</code><code><br>
</code><code>20: 17667606.200000 per second</code><code><br>
</code><code>21: 17670063.800000 per second</code><code><br>
</code><code>22: 592950.200000 per second</code><code><br>
</code><code>23: 592950.200000 per second</code><code><br>
</code><code>24: 17667606.200000 per second</code><code><br>
</code><code>25: 17670063.800000 per second</code><code><br>
</code><code>26: 17667606.200000 per second</code><code><br>
</code><code>27: 17699551.800000 per second</code><code><br>
</code><code>28: 17697907.000000 per second</code><code><br>
</code><code>29: 17699551.800000 per second</code><code><br>
</code><code>30: 1216486.400000 per second</code><code><br>
</code><code> total: 230756497.800000 per second</code><code><br>
</code><code> average: 7691883.260000 per second</code><code><br>
</code><code> stddev: 8132709.287741 per second</code><code><br>
</code><code>209005, 20000</code><code><br>
</code><code>write_cb: write 12</code><code><br>
</code><code>write_cb: write -1</code></p>
<p>At least some of the libevent test scripts output only this
content (i.e. they don't run any of the PASS/FAIL/SKIP tests), so
I'll look into dropping those from the ptest unless there's a
reason we'd want to leave them in. <br>
<code></code><code></code><code></code></p>
</body>
</html>