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

testsuite: relocate libflux unit tests #1827

Merged
merged 8 commits into from
Nov 13, 2018

Commits on Nov 13, 2018

  1. testsuite: eliminate libflux unit test connector dependency

    Problem: some libflux unit tests are located in the sharness
    area due to their dependence on the shmem:// connector.
    
    Add a stripped down connector implementation based on a CZMQ
    "inproc" pair socket (like shmem://) used by the test server
    code that does not depend on calling flux_open() and thus
    can be hardwired rather than dlopened from the connector directory.
    
    Also some cleanup: add header documentation and add a new function
    test_server_environment_init() to initialize czmq zsys, then
    update tests to call that.
    garlick committed Nov 13, 2018
    Configuration menu
    Copy the full SHA
    37d749b View commit details
    Browse the repository at this point in the history
  2. testsuite: relocate libflux unit tests

    Problem: mrpc, rpc, and rpc_chained unit tests and their
    test server helper are located in the sharness area.
    
    Now that the test server is unencumbered from its dependency
    on the shmem connector, move these tests to libflux/test.
    
    There was a name clash on the mrpc.c test, but the libflux
    one only contained a couple of trivial checks, so those checks
    were incorporated into the loopback one.
    
    Partially addresses flux-framework#1823
    garlick committed Nov 13, 2018
    Configuration menu
    Copy the full SHA
    027c708 View commit details
    Browse the repository at this point in the history
  3. testsuite: add loopback_create()

    Problem: libflux unit tests are dependent on the loop://
    connector and thus cannot be located within the libflux
    directory.
    
    Add loopback_create() to the test server helper.
    This creates a flux_t handle with loopback behavior
    identical to the loop:// connector, except since it is
    only used in unit tests, it can BAIL_OUT() on fatal
    errors.
    
    Also cleanup:  if test server is not provided with a
    server callback, provide an internal one that logs all
    messages received by the server.  Simplify some error
    handling (use BAIL_OUT for unlikely errors).
    garlick committed Nov 13, 2018
    Configuration menu
    Copy the full SHA
    25c2796 View commit details
    Browse the repository at this point in the history
  4. testsuite: relocate more libflux unit tests

    Problem: dispatch, handle, log, reactor, reduce,
    and rolemask/loop unit tests are located in the
    sharness area.
    
    Now that the test server offers a loopback mode, these
    tests that were dependent on the loop:// connector can
    be moved to libflux/test.
    
    There was a name clash on the 'handle.c' test, but the
    one in libflux only had a couple of checks in it, so
    those checks were pulled into the larger loopback one.
    
    There was a name clash on the 'reactor.c' test.
    The loopback one was renamed to 'reactor_loop.c'.
    
    Renamed rolemask/loop.c to rpc_security.c.
    
    Partially addresses flux-framework#1823
    garlick committed Nov 13, 2018
    Configuration menu
    Copy the full SHA
    dcdefa2 View commit details
    Browse the repository at this point in the history
  5. testsuite: port libflux unit tests to loopback

    Problem: the libflux unit tests reduce,
    reactor_loop, dispatch, handle, and rpc_security
    flux_open ("loop://") which depends on
    src/connectors/loop being built.
    
    Switch to loopback_create(), which is self-contained
    in libflux.
    garlick committed Nov 13, 2018
    Configuration menu
    Copy the full SHA
    0a2e306 View commit details
    Browse the repository at this point in the history
  6. connectors/loop: drop getopt/setopt

    Problem: with recent changes to libflux unit tests, the
    options for getting and setting test credentials in
    the loop:// connector have no users.
    
    Drop the options.  This was really only added to support
    the libflux/rpc_security unit test, and now that test is
    not using loop://.
    garlick committed Nov 13, 2018
    Configuration menu
    Copy the full SHA
    a1a6166 View commit details
    Browse the repository at this point in the history
  7. connectors/shmem: drop setopt

    Problem: with recent changes to libflux unit tests, the
    options for setting test credentials in the shmem://
    connector have no users.
    
    This was added to support the back-to-back shmem://
    connectors in libflux/util.c, but that module is now
    standalone.
    garlick committed Nov 13, 2018
    Configuration menu
    Copy the full SHA
    eb8b6b4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    de00d9e View commit details
    Browse the repository at this point in the history