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

Merged
merged 1 commit into from Sep 6, 2018

Conversation

Projects
None yet
6 participants
@lorjala
Contributor

lorjala commented Sep 5, 2018

Description

Fix linker error by updating rtos::Mutex::lock() in UNITTESTS/stubs/Mutex_stub.cpp.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change
@@ -27,7 +27,7 @@ rtos::Mutex::~Mutex()
return;
}
osStatus rtos::Mutex::lock(unsigned int)
osStatus rtos::Mutex::lock(void)

This comment has been minimized.

@0xc0170

0xc0170 Sep 5, 2018

Member

Fix looks good - to update to a new method but this should not cause a linker error (overloaded method). Please explain

This comment has been minimized.

@lorjala

lorjala Sep 5, 2018

Contributor

@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

This comment has been minimized.

@0xc0170

0xc0170 Sep 5, 2018

Member

stub should implement both (void and uint32 arguments) methods, this is just one?

This comment has been minimized.

@lorjala

lorjala Sep 5, 2018

Contributor

Now it implements both.

@lorjala lorjala force-pushed the lorjala:unittests_fix branch from 5756ca3 to 4b04227 Sep 5, 2018

@0xc0170

0xc0170 approved these changes Sep 5, 2018

@0xc0170 0xc0170 requested a review from ARMmbed/mbed-os-core Sep 5, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 5, 2018

/morph build

@cmonr cmonr requested a review from ARMmbed/mbed-os-test Sep 5, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Sep 5, 2018

@0xc0170 This should be @ARMmbed/mbed-os-test since the code change is to the unittest stub.

@mbed-ci

This comment has been minimized.

mbed-ci commented Sep 5, 2018

Build : SUCCESS

Build number : 3012
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7988/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@cmonr cmonr added needs: CI and removed needs: review labels Sep 5, 2018

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Sep 5, 2018

Multiply defined asm symbols...
/morph export-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Sep 6, 2018

Test failure does not appear to be related to PR.
/morph test.

Another ASM Symbol multiply defined error. Curious that this is the second time (@ARMmbed/mbed-os-test)
/morph export-build

@cmonr

This comment has been minimized.

Contributor

cmonr commented Sep 6, 2018

Whoops, added a period.
/morph test

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Sep 6, 2018

@0xc0170 0xc0170 merged commit 7a8e849 into ARMmbed:master Sep 6, 2018

14 checks passed

ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed , RTOS ROM(+0.0%) RAM(+0.0%)
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/cloud_client_smoke_test Test job: successful
Details
travis-ci/astyle Passed, 597 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9205 cycles (+79 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Sep 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment