On Jun 23, 2021, at 7:24 AM, Zimoch Dirk (PSI) via Core-talk <
core-talk at aps.anl.gov> wrote:
I am running the libCom tests on vxWorks to see if I broke anything (implementing new atomicCompareAndSwap).
Please always mention which VxWorks version you are testing against, you seem to run several, whereas we only use 6.9.4.1 which is what I have run tests on. The version matters since we started relying on APIs which only appeared during the VxWorks 6.x
series of releases, and I don’t run tests on OS versions which APS doesn’t use.
I found that some tests were failing (even crashing) already with the current 7.0 version (commit :1cacd05).
Listing the faults here (full log attached)
Note the crash of "await" in the first test!
(Sometimes it prints instead: (await): Unhandled C++ exception resulted in call to terminate )
It dies taking an uninitialized semaphore.
-> tt
0x00129464 vxTaskEntry +0x48 : epicsThreadEntry ()
0x0066769c epicsThreadEntry+0x80 : <unnamed>::dowait(void *) ()
0x00618098 <unnamed>::dowait(void *)+0x1c : epicsEvent::wait() ()
0x0065f14c epicsEvent::wait()+0x24 : semTake ()
0x001e7738 semTake +0xac : 0x00000004 ()
value = 0 = 0x0
***** epicsThreadTest *****
1..15
# System has 1 CPUs
ok 1 - ncpus > 0
# main() thread 0x50fa10
not ok 2 - Join delayed parent (0 seconds) # TODO Thread join doesn't work
ok 3 - Join tests #1 completed
not ok 4 - Join delayed parent (0 seconds) # TODO Thread join doesn't work
There are TODO comments there, so these tests aren't expected to work on this OS version. Evidently the later parts of this test program didn’t get fully protected against the missing/incomplete implementations on your VxWorks version (hence your crash
above), but these tests did pass on 6.9.4.1 for me (taskLib added the join API later in that series).
***** epicsEventTest *****
not ok 15 - epicsEventWaitWithTimeout(0.250000) delay error -0.000001 sec # TODO Known issue with delay calculation
not ok 16 - epicsEventWaitWithTimeout(0.125000) delay error -0.008332 sec # TODO Known issue with delay calculation
not ok 17 - epicsEventWaitWithTimeout(0.062500) delay error -0.012500 sec # TODO Known issue with delay calculation
not ok 18 - epicsEventWaitWithTimeout(0.031250) delay error -0.014586 sec # TODO Known issue with delay calculation
TODO => Expected, not counted as a test failure.
***** epicsSockResolveTest *****
not ok 26 - aToIPAddr("127.0.0.test", 4000) -> 0
# IP=0x7f000000, port=4000
not ok 27 - aToIPAddr("127.0.0.test:42", 4000) -> 0
# IP=0x7f000000, port=42
not ok 30 - aToIPAddr("1.2.3.4.5", 4000) -> 0
# IP=0x1020304, port=4000
not ok 31 - aToIPAddr("1.2.3.4.5:6", 4000) -> 0
# IP=0x1020304, port=6
I don’t remember seeing these failures before, they appear fairly benign. My guess is that it’s the OS which is doing the string conversions so these are VxWorks bugs, but I might be wrong.
***** epicsStdlibTest *****
not ok 166 - Double '1e-330' => underflow # TODO Not detected on VxWorks
TODO => Expected.
***** macDefExpandTest *****
# Got "", expected "BAR".
not ok 27 - ${=BAR}
# Got "xy", expected "xBARy".
not ok 28 - x${=BAR}y
Interesting, does that happen on later OS versions? This might be using environment variables, not sure.
After finishing, ("Reached mainExit") the test program hangs instead of returning to the vxWorks shell.
Expected, I told you that would happen – calling exit() from the VxWorks tShell task shuts down the OS. That final test is checking that the epicsAtExit() routines get called as they’re supposed to when it does shut down, so we cannot make it return to
the shell prompt.
- Andrew