-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unittesting: Update mutex stub #7988
Conversation
@@ -27,7 +27,7 @@ rtos::Mutex::~Mutex() | |||
return; | |||
} | |||
|
|||
osStatus rtos::Mutex::lock(unsigned int) | |||
osStatus rtos::Mutex::lock(void) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix looks good - to update to a new method but this should not cause a linker error (overloaded method). Please explain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xc0170 Since unit tests use UNITTESTS/stubs/Mutex_stub.cpp
to implement rtos/Mutex.h
and rtos::Mutex::lock() was not implemented, a test failed with:
Undefined symbols for architecture x86_64:
"rtos::Mutex::lock()", referenced from:
InternetSocket::open(NetworkStack*) in libfeatures_netsocket_UDPSocket.MbedOS.a(InternetSocket.cpp.o)
InternetSocket::close() in libfeatures_netsocket_UDPSocket.MbedOS.a(InternetSocket.cpp.o)
InternetSocket::bind(SocketAddress const&) in libfeatures_netsocket_UDPSocket.MbedOS.a(InternetSocket.cpp.o)
InternetSocket::set_timeout(int) in libfeatures_netsocket_UDPSocket.MbedOS.a(InternetSocket.cpp.o)
InternetSocket::setsockopt(int, int, void const*, unsigned int) in libfeatures_netsocket_UDPSocket.MbedOS.a(InternetSocket.cpp.o)
InternetSocket::getsockopt(int, int, void*, unsigned int*) in libfeatures_netsocket_UDPSocket.MbedOS.a(InternetSocket.cpp.o)
InternetSocket::sigio(mbed::Callback<void ()>) in libfeatures_netsocket_UDPSocket.MbedOS.a(InternetSocket.cpp.o)
...
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stub should implement both (void and uint32 arguments) methods, this is just one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it implements both.
/morph build |
@0xc0170 This should be @ARMmbed/mbed-os-test since the code change is to the unittest stub. |
Build : SUCCESSBuild number : 3012 Triggering tests/morph test |
Exporter Build : FAILUREBuild number : 2624 |
Multiply defined asm symbols... |
Test : FAILUREBuild number : 2779 |
Exporter Build : FAILUREBuild number : 2626 |
Test failure does not appear to be related to PR. Another ASM Symbol multiply defined error. Curious that this is the second time (@ARMmbed/mbed-os-test) |
Whoops, added a period. |
Test : SUCCESSBuild number : 2782 |
Exporter Build : SUCCESSBuild number : 2628 |
Description
Fix linker error by updating rtos::Mutex::lock() in
UNITTESTS/stubs/Mutex_stub.cpp
.Pull request type