[reSIProcate] running reCon unitTests.cxx without audio hardware (in travis-ci, etc)
Daniel Pocock
daniel at pocock.pro
Tue May 18 09:43:05 CDT 2021
I had a look at resip/recon/test/unitTests.cxx
When it is run without supported audio hardware, it fails, example at
bottom. Therefore, I added a configure argument and corresponding macro
to run the tests with a MediaResourceParticipant instead of
LocalParticipant:
AM_CONDITIONAL(RECON_LOCAL_HW_TESTS, false)
AC_ARG_ENABLE(recon-local-hw-tests,
[ --enable-recon-local-hw-tests Attempt to use local audio hardware in
unit tests],
#ifdef RECON_LOCAL_HW_TESTS
// wants to use local hardware
Using the MediaResourceParticipant, I get a different error, it fails on
the bobUa.shutdown() call for the first test sequence with
sipXConversationMediaInterfaceMode
Thread 1 "unitTests" received signal SIGABRT, Aborted.
0x00003ffff64db228 in __libc_signal_restore_set (set=0x3ffffff6ca68) at
../sysdeps/unix/sysv/linux/internal-signals.h:84
84 ../sysdeps/unix/sysv/linux/internal-signals.h: No such file or directory.
(gdb) bt
#0 0x00003ffff64db228 in __libc_signal_restore_set (set=0x3ffffff6ca68)
at ../sysdeps/unix/sysv/linux/internal-signals.h:84
#1 __GI_raise (sig=<optimized out>) at
../sysdeps/unix/sysv/linux/raise.c:48
#2 0x00003ffff64bb58c in __GI_abort () at abort.c:79
#3 0x00003ffff64ce910 in __assert_fail_base (fmt=<optimized out>,
assertion=assertion at entry=0x3ffff7eac280 "(mMediaInterface)",
file=file at entry=0x3ffff7eac248 "Conversation.hxx", line=line at entry=78,
function=function at entry=0x3ffff7eac3c8
<recon::Conversation::getMediaInterface() const::__PRETTY_FUNCTION__>
"std::shared_ptr<recon::SipXMediaInterface>
recon::Conversation::getMediaInterface() const") at assert.c:92
#4 0x00003ffff64ce9b4 in __GI___assert_fail (assertion=0x3ffff7eac280
"(mMediaInterface)", file=0x3ffff7eac248 "Conversation.hxx",
line=<optimized out>,
function=0x3ffff7eac3c8 <recon::Conversation::getMediaInterface()
const::__PRETTY_FUNCTION__> "std::shared_ptr<recon::SipXMediaInterface>
recon::Conversation::getMediaInterface() const") at assert.c:101
#5 0x00003ffff7da6ef8 in recon::Conversation::getMediaInterface
(this=0x3ffff7708c10 <vtable for resip::Uri+16>) at Conversation.hxx:78
#6 0x00003ffff7e06aa8 in recon::Participant::getMediaInterface
(this=0x100192d70) at Participant.cxx:132
#7 0x00003ffff7de9b30 in
recon::SipXMediaResourceParticipant::stopResource (this=0x100192d70) at
SipXMediaResourceParticipant.cxx:340
#8 0x00003ffff7e00f00 in
recon::MediaResourceParticipant::destroyParticipant (this=0x100192d70)
at MediaResourceParticipant.cxx:170
#9 0x00003ffff7dacb90 in recon::ConversationManager::shutdown
(this=0x3ffffff6dda8) at ConversationManager.cxx:76
#10 0x00003ffff7e29704 in recon::UserAgent::shutdownImpl
(this=0x3ffffffb63b0) at UserAgent.cxx:608
#11 0x00003ffff7e2cbec in recon::UserAgentShutdownCmd::executeCommand
(this=0x10019e830) at UserAgentCmds.hxx:30
#12 0x00003ffff7995e58 in resip::DialogUsageManager::internalProcess
(this=0x3fffffffe110,
msg=std::unique_ptr<class resip::Message> = {...}) at
DialogUsageManager.cxx:1493
#13 0x00003ffff799766c in resip::DialogUsageManager::process
(this=0x3fffffffe110, timeoutMs=100, mutex=0x0) at
DialogUsageManager.cxx:1749
#14 0x00003ffff7e26c24 in recon::UserAgent::process
(this=0x3ffffffb63b0, timeoutMs=100) at UserAgent.cxx:203
#15 0x00003ffff7e26cfc in recon::UserAgent::shutdown
(this=0x3ffffffb63b0) at UserAgent.cxx:215
#16 0x0000000100024008 in executeConversationTest
(mode=recon::SipXConversationManager::sipXConversationMediaInterfaceMode)
at unitTests.cxx:772
#17 0x0000000100024518 in main (argc=1, argv=0x3fffffffee18) at
unitTests.cxx:814
Fails when running on a Linux host without local audio hardware:
unitTests: mp/MprFromInputDevice.cpp:256: virtual UtlBoolean
MprFromInputDevice::doProcessFrame(MpBufPtr*, MpBufPtr*, int, int,
UtlBoolean, int, int): Assertion `stat == OS_SUCCESS' failed.
Thread 3 "unitTests" received signal SIGABRT, Aborted.
[Switching to LWP 18931]
0x00003ffff64db228 in ?? ()
More information about the resiprocate-devel
mailing list