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

INTEGRATION_WeakPluginPtr test fails #7

Open
osrf-migration opened this issue Mar 30, 2020 · 1 comment
Open

INTEGRATION_WeakPluginPtr test fails #7

osrf-migration opened this issue Mar 30, 2020 · 1 comment
Labels
bug Something isn't working tests Broken or missing tests / testing infra

Comments

@osrf-migration
Copy link

Original report (archived issue) by Juan Oxoby (Bitbucket: Juan Oxoby).


Prerequisites

  • [X ] Put an X between the brackets on this line if you have done all of the following:

Description

INTEGRATION_WeakPluginPtr is failing on my machine.

Steps to Reproduce

  1. Run INTEGRATION_WeakPluginPtr

Expected behavior:

PASSED

Actual behavior:

[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from WeakPluginPtr
[ RUN      ] WeakPluginPtr.Lifecycle
/home/juan/ignition_workspace/src/ign-plugin/test/integration/WeakPluginPtr.cc:59: Failure
Expected equality of these values:
  nullptr
    Which is: NULL
  dlHandle
    Which is: 0x55fdb805a330
[  FAILED  ] WeakPluginPtr.Lifecycle (0 ms)
[ RUN      ] WeakPluginPtr.CopyMove
[       OK ] WeakPluginPtr.CopyMove (0 ms)
[----------] 2 tests from WeakPluginPtr (0 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (0 ms total)
[  PASSED  ] 1 test.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] WeakPluginPtr.Lifecycle

Reproduces how often:

Always

Versions

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:    18.04
Codename:   bionic

$ gcc --version
gcc (Ubuntu 8.3.0-6ubuntu1~18.04.1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Additional Information

The error points to the macro CHECK_FOR_LIBRARY defined on integration/utils.hh

There’s a comment there saying:

/////////////////////////////////////////////////
// Note (MXG): According to some online discussions, there is no guarantee
// that a correct number of calls to dlclose(void*) will actually unload the
// shared library. In fact, there is no guarantee that a dynamically loaded
// library from dlopen will ever be unloaded until the program is terminated.
// This may cause dlopen(~, RTLD_NOLOAD) to return a non-null handle even if
// we are managing the handles correctly. If the test for
// EXPECT_EQ(nullptr, dlHandle) is found to fail occasionally, we should
// consider removing it because it may be unreliable. At the very least, if
// it fails very infrequently, then we can safely consider the failures to be
// false negatives and may want to consider relaxing this test.

Avoiding the check EXPECT_EQ(nullptr, dlHandle) in the macro CHECK_FOR_LIBRARY makes the test pass.

@osrf-migration
Copy link
Author

Original comment by Juan Oxoby (Bitbucket: Juan Oxoby).


  • Edited issue description

@osrf-migration osrf-migration added major bug Something isn't working labels Apr 15, 2020
@chapulina chapulina added tests Broken or missing tests / testing infra and removed major labels May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests Broken or missing tests / testing infra
Projects
None yet
Development

No branches or pull requests

2 participants