1. 20 May, 2022 1 commit
    • SIMONIN Matthieu's avatar
      parameterize num_buffers · 1462d26d
      SIMONIN Matthieu authored
      num_buffers controls the number of packets that are intercepted and
      stored by tansiv-client until the next deadline. A too small value will
      drop extraneous packets (silently unless you know how to activate the
      tansiv logs).
      
      This patch allow its parameterization at
      - qemu level (passed in the global vsg option)
      - boot.py level
      1462d26d
  2. 29 Mar, 2022 1 commit
  3. 28 Mar, 2022 2 commits
  4. 25 Mar, 2022 2 commits
  5. 23 Mar, 2022 1 commit
    • SIMONIN Matthieu's avatar
      Introduce socket.hpp/cpp · 8bf98472
      SIMONIN Matthieu authored
      This gathers the function to send/recv reliably messages on a socket.
      Also contains a helper function to receive a size prefixed flatbuffer
      message.
      
      The patch also remove the src/vsg directory as well as the need for
      building libvsg.a.
      8bf98472
  6. 20 Mar, 2022 1 commit
  7. 19 Mar, 2022 3 commits
  8. 18 Mar, 2022 4 commits
  9. 21 Feb, 2022 4 commits
  10. 17 Feb, 2022 2 commits
    • SIMONIN Matthieu's avatar
      Merge branch 'dev/test_wait_actor' into 'master' · 1c9fdc09
      SIMONIN Matthieu authored
      tests: Make possible to get child actor exit code
      
      Closes #28
      
      See merge request !23
      1c9fdc09
    • SIMONIN Matthieu's avatar
      tests: Make possible to get child actor exit code · 30303fd8
      SIMONIN Matthieu authored
      Fix #28
      
      To test client / actor protocol communication, actor execution is forked
      while client test code is executed in the parent process (the cargo test
      process).
      
      Until now, as soon as the client (parent process) finishes its execution
      the actor (child process) is dropped/killed. In some situation the actor
      don't have the chance to cover all of its test logic.
      Also actor test logic fails silently in the sense that only error log
      message are displayed when an asertion fails. No error is propagated to
      the parent process (parent process).
      
      This patch:
      - make possible to wait for the actor to finish before leaving the test.
        A `wait` method is added to the TestActor implementation to wait for
        the actor to terminate. This can be called by a test if deemed necessary.
        For instance it's added in `run_client_and_actor` helper method which
        covers most of the connector tests.
      
      - propagate an error to the parent process.
        User of `wait` can check the return code of the child process.
      
      - enable logging in connector's tests. They can be displayed in `cargo
        tests` using `TEST_FLAGS="--nocapture"`. This is the case in the
        Dockerfile.
      30303fd8
  11. 19 Jan, 2022 2 commits
  12. 12 Jan, 2022 1 commit
    • SIMONIN Matthieu's avatar
      VmsInterface: add a count of messages · ba096bcf
      SIMONIN Matthieu authored
      This can keep track of:
      - the total number of messages going through tansiv
      - message identification, each message is assigned an id (in the current
      implementation this is the value of the counter at the time of reception)
      ba096bcf
  13. 10 Jan, 2022 1 commit
    • SIMONIN Matthieu's avatar
      tansiv.py: align wrapper requirement · 562db5c0
      SIMONIN Matthieu authored
      when running a TS, tansiv injects the socket name as the first argument
      of the script that is fork/exec-ed.
      notansiv.py is the symetric to tansiv but for nts system but use the
      same wrapper script at the end (boot.py). So we make notansiv also
      inject a (dummy) socket name as the first parameter of the boot.py
      script.
      562db5c0
  14. 06 Jan, 2022 1 commit
  15. 13 Dec, 2021 1 commit
    • SIMONIN Matthieu's avatar
      Cmake update · b6253a21
      SIMONIN Matthieu authored
      - custom target to launch the tests
          - (tansiv/cpp) add a wrapper script
          - (client/rust) call the test target of the client's Makefile
      - clean TANPROC_LIBS use
      b6253a21
  16. 08 Dec, 2021 2 commits
  17. 07 Dec, 2021 3 commits
  18. 06 Dec, 2021 1 commit
  19. 03 Dec, 2021 5 commits
  20. 29 Nov, 2021 1 commit
    • RILLING Louis's avatar
      tests: Fix termination by signal of the fake actor · 0b50cc39
      RILLING Louis authored
      The signal handler of SIGQUIT calls exit() which is not signal safe.
      This sometimes leads to deadlocks (see the backtrace below where
      pthread_mutex_lock() is interrupted by the signal and called on the
      same lock by exit()). To fix this just call _exit().
      
       (gdb) bt
       #0  0x0000792090f0f5cb in __lll_lock_wait () from target:/lib/x86_64-linux-gnu/libpthread.so.0
       #1  0x0000792090f08211 in pthread_mutex_lock () from target:/lib/x86_64-linux-gnu/libpthread.so.0
       #2  0x0000792090f4735f in ?? () from target:/lib64/ld-linux-x86-64.so.2
       #3  0x0000792090a0a537 in ?? () from target:/lib/x86_64-linux-gnu/libc.so.6
       #4  0x0000792090a0a6da in exit () from target:/lib/x86_64-linux-gnu/libc.so.6
       #5  0x00005a95f258ed39 in sigquit (signum=3) at /usr/include/c++/11/bits/catch.hpp:18
       #6  <signal handler called>
       #7  0x0000792090f08193 in pthread_mutex_lock () from target:/lib/x86_64-linux-gnu/libpthread.so.0
       #8  0x0000792090f2a40d in dlsym () from target:/lib/x86_64-linux-gnu/libdl.so.2
       #9  0x00005a95f24cba89 in std::sys::unix::weak::fetch (name=<optimized out>)
           at library/std/src/sys/unix/weak.rs:101
       #10 std::sys::unix::weak::Weak<F>::initialize (
           self=0x5a95f2847c88 <std::sys::unix::rand::imp::getrandom::getrandom::getrandom>)
           at library/std/src/sys/unix/weak.rs:85
       #11 0x00005a95f267f398 in std::sys::unix::weak::Weak<F>::get (self=<optimized out>)
           at library/std/src/sys/unix/weak.rs:54
       #12 std::sys::unix::rand::imp::getrandom::getrandom (buffer=0x7ffd9778bd10, length=16, flags=1)
           at library/std/src/sys/unix/weak.rs:135
       #13 std::sys::unix::rand::imp::getrandom (buf=...) at library/std/src/sys/unix/rand.rs:44
       #14 std::sys::unix::rand::imp::getrandom_fill_bytes (v=...) at library/std/src/sys/unix/rand.rs:69
       #15 std::sys::unix::rand::imp::fill_bytes (v=...) at library/std/src/sys/unix/rand.rs:102
       #16 0x00005a95f2691808 in std::sys::unix::rand::hashmap_random_keys ()
           at library/std/src/sys/unix/rand.rs:8
       #17 0x00005a95f25dbffa in std::thread::local::fast::Key<T>::try_initialize ()
       #18 0x00005a95f25ddccd in <clap::args::arg_matcher::ArgMatcher as core::default::Default>::default ()
       #19 0x00005a95f26ce92d in clap::app::App::get_matches_from_safe ()
       #20 0x00005a95f26c8171 in tansiv_client::init ()
       #21 0x00005a95f25915fc in vsg_init ()
       #22 0x00005a95f24f8373 in ____C_A_T_C_H____T_E_S_T____9 () at /usr/include/c++/11/bits/atomic:145
       #23 0x00005a95f24e486c in Catch::TestInvokerAsFunction::invoke (this=0x5a95f39586c0)
           at /srv/src/build/std_abs.h:14321
       #24 0x00005a95f24e3bb3 in Catch::TestCase::invoke (this=0x5a95f3969f68)
           at /srv/src/build/std_abs.h:14160
       #25 0x00005a95f24de7ff in Catch::RunContext::invokeActiveTestCase (this=0x7ffd9778cf30)
           at /srv/src/build/std_abs.h:13020
       #26 0x00005a95f24de583 in Catch::RunContext::runCurrentTest (this=0x7ffd9778cf30, redirectedCout=...,
           redirectedCerr=...) at /srv/src/build/std_abs.h:12993
       #27 0x00005a95f24dd211 in Catch::RunContext::runTest (this=0x7ffd9778cf30, testCase=...)
           at /srv/src/build/std_abs.h:12754
       #28 0x00005a95f24dff27 in Catch::(anonymous namespace)::TestGroup::execute (this=0x7ffd9778cf20)
           at /srv/src/build/std_abs.h:13347
       #29 0x00005a95f24e1203 in Catch::Session::runInternal (this=0x7ffd9778d230)
           at /srv/src/build/std_abs.h:13553
       #30 0x00005a95f24e0f48 in Catch::Session::run (this=0x7ffd9778d230) at /srv/src/build/std_abs.h:13509
       #31 0x00005a95f251ee17 in Catch::Session::run<char> (this=0x7ffd9778d230, argc=2, argv=0x7ffd9778d4c8)
           at /srv/src/build/std_abs.h:13231
       #32 0x00005a95f24f636f in main (argc=2, argv=0x7ffd9778d4c8) at /srv/src/build/std_abs.h:17526
      0b50cc39
  21. 24 Nov, 2021 1 commit