Skip to content
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
Merged

Unittesting: Update mutex stub #7988

merged 1 commit into from
Sep 6, 2018

Conversation

lorjala
Copy link
Contributor

@lorjala 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)
Copy link
Contributor

@0xc0170 0xc0170 Sep 5, 2018

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

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it implements both.

@0xc0170 0xc0170 requested a review from a team September 5, 2018 10:46
@0xc0170
Copy link
Contributor

0xc0170 commented Sep 5, 2018

/morph build

@cmonr cmonr requested a review from a team September 5, 2018 14:11
@cmonr
Copy link
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
Copy link

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

@mbed-ci
Copy link

mbed-ci commented Sep 5, 2018

@cmonr
Copy link
Contributor

cmonr commented Sep 5, 2018

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

@mbed-ci
Copy link

mbed-ci commented Sep 5, 2018

@mbed-ci
Copy link

mbed-ci commented Sep 5, 2018

@cmonr
Copy link
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
Copy link
Contributor

cmonr commented Sep 6, 2018

Whoops, added a period.
/morph test

@mbed-ci
Copy link

mbed-ci commented Sep 6, 2018

@mbed-ci
Copy link

mbed-ci commented Sep 6, 2018

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

Successfully merging this pull request may close these issues.

None yet

6 participants