Skip to content

Testing: Fix multihoming test compilation issues #12731

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

Merged
merged 3 commits into from
Apr 15, 2020
Merged

Testing: Fix multihoming test compilation issues #12731

merged 3 commits into from
Apr 15, 2020

Conversation

kivaisan
Copy link
Contributor

@kivaisan kivaisan commented Mar 31, 2020

Summary of changes

Fix multihoming test compilation issues.

  • TEST_ASSERT_EQUAL compares int values and converting SocketAddress as int is not supported.
  • TRACE_GROUP was missing preventing trace builds
  • Workaround for SocketAddress _ip_address.reset() compilation problem with IAR.

Fixes #12720

Impact of changes

Migration actions required

Documentation

None


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


TEST_ASSERT_EQUAL compares int values and converting SocketAddress as int is not supported.
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 31, 2020

@kivaisan Thanks for fixing this quickly. Is this breakage also present in the latest nightly?

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 31, 2020

Answer to my question - I realized I was looking earlier today at the logs and saw it

Build failures:
  * UBLOX_EVK_ODIN_W2::ARMC6::TESTS-NETWORK-MULTIHOMING
        Building project multihoming (UBLOX_EVK_ODIN_W2, ARMC6)
        Scan: ARM
        Scan: multihoming
        Compile [ 25.0%]: main.cpp
        [Warning] LWIPStack.h@300,27: 'get_ip_address' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        [Error] main.cpp@84,5: cannot convert 'SocketAddress' to '_U_SINT' (aka 'long long') without a conversion operator
        [Error] main.cpp@84,5: cannot convert 'SocketAddress' to '_U_SINT' (aka 'long long') without a conversion operator
        [Error] main.cpp@115,9: cannot convert 'SocketAddress' to '_U_SINT' (aka 'long long') without a conversion operator
        [Error] main.cpp@115,9: cannot convert 'SocketAddress' to '_U_SINT' (aka 'long long') without a conversion operator

0xc0170
0xc0170 previously approved these changes Mar 31, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 31, 2020

CI started

@kjbracey
Copy link
Contributor

Thanks for fix. IAR's library has a bug in its array-type unique_ptr - it's got a missing reset overload. Should report that - @0xc0170, do you remember your bug report login? :)

That TEST_ASSERT_EQUAL thing was a great example of why SocketAddress shouldn't have had a non-explicit operator bool, and what adding the explicit was intended to catch.

It compiled, but didn't do what you wanted; it converted each address to bool and compared the bools, not the addresses.

@mbed-ci
Copy link

mbed-ci commented Mar 31, 2020

Test run: FAILED

Summary: 2 of 6 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_cloud-client-pytest
  • jenkins-ci/mbed-os-ci_greentea-test

@mergify mergify bot dismissed 0xc0170’s stale review April 1, 2020 05:26

Pull request has been modified.

@kivaisan kivaisan changed the title Testing: Fix SocketAddress compilation issues Testing: Fix multihoming test compilation issues Apr 1, 2020
@kivaisan
Copy link
Contributor Author

kivaisan commented Apr 1, 2020

@kjbracey-arm @0xc0170 reset(nullptr) doesn't seem to work either, so do you have any idea how to handle IAR issue?

I removed it from this PR and added multihoming trace build fix.

This is a workaround for IAR library bug.
@kivaisan
Copy link
Contributor Author

kivaisan commented Apr 1, 2020

IAR compilation issue now also fixed. This is now ready for review & CI.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 1, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 1, 2020

Test run: FAILED

Summary: 1 of 6 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@mergify mergify bot added needs: work and removed needs: CI labels Apr 1, 2020
@MarceloSalazar
Copy link

Note we should be applying these changes to the 5.15 branch too, as that's where we'll continue to support the Ublox ODIN platform.

@kivaisan
Copy link
Contributor Author

kivaisan commented Apr 2, 2020

Note we should be applying these changes to the 5.15 branch too, as that's where we'll continue to support the Ublox ODIN platform.

No necessarily:

  • TEST_ASSERT_EQUAL actually does not check the correct thing, but is this so critical that should be fixed in 5.15. I leave it to maintainers to decide.
  • TRACE_GROUP build issue occurs only when mbed trace is enabled. By default traces are not enabled for tests. So I don't see this that critical at all.
  • unique_ptr::reset workaround is a regression from mbed-os 6 SocketAddress refactoring. Therefore does not apply to mbed-os 5.15.

@kivaisan
Copy link
Contributor Author

kivaisan commented Apr 2, 2020

@0xc0170 NUCLEO_F429ZI GCC_ARM tests-netsocket-tls failure looks like a random start up failure. Could you just restart the CI?

@mbed-ci
Copy link

mbed-ci commented Apr 7, 2020

Test run: FAILED

Summary: 3 of 3 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM-lts
  • jenkins-ci/mbed-os-ci_build-GCC_ARM-lts
  • jenkins-ci/mbed-os-ci_unittests-lts

@mergify mergify bot added the needs: CI label Apr 7, 2020
@mergify mergify bot removed the needs: work label Apr 7, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 14, 2020

CI restarted, will clean lts test (not the one for this PR)

@mbed-ci
Copy link

mbed-ci commented Apr 14, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 3
Build artifacts

@0xc0170 0xc0170 merged commit fef75b3 into ARMmbed:master Apr 15, 2020
@mergify mergify bot removed the ready for merge label Apr 15, 2020
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.

Errors while compiling test cases for ODIN W2
5 participants