Skip to content
Snippets Groups Projects
  1. Mar 30, 2021
    • Karel Koci's avatar
      nsfarm: allow and disable input read for serial console · 3c7282dd
      Karel Koci authored
      This reason for this is that we use at some point serial console only to
      get logs. We do not process it further. There is no reader for serial
      console at most of time.
      This change allows disable of serial console input and serial console
      logs are thus only logged without further propagation.
      3c7282dd
    • Karel Koci's avatar
      tests/test_bootup: check if services we want are enabled · 748f9db2
      Karel Koci authored
      This checks not only if services we want are running but also if they
      are enabled.
      The real reason for this is not to cover issue of disabled but running
      service as that is highly unlikely. This rather covers services that
      spawn actually no process but still we have to check if they are enabled
      and thus executed in some manner. There is a lot of such services.
      748f9db2
    • Karel Koci's avatar
      tests/test_bootup: add check for accessbile web interface · 1912c20a
      Karel Koci authored
      It should be enough to just download index for now. It checks only if we
      are able to access HTTP, nothing more.
      1912c20a
    • Karel Koci's avatar
      nsfarm/cli: fix delayed logging of PexpectLogging · 4ab73125
      Karel Koci authored
      The issue was invalid condition as well as that if all input was
      consumed that linebuf stayed set to old (already consumed) value.
      4ab73125
    • Karel Koci's avatar
      tests: add not_board mark · cebecdc2
      Karel Koci authored
      This is negation of board mark. This should help us to limit tests not
      only to explicit list of boards but also do exclusion list.
      
      The immediate usage of this is in DNS resolver processes check.
      cebecdc2
    • Karel Koci's avatar
      nsfarm/toolbox: add check for running service · 5909ade1
      Karel Koci authored
      The idea of having one module called toolbox is simply to share common
      short but still little bit complicated functions in multiple tests.
      
      This also implements first test using this function. It checks if all
      services we expect to run after router start are actually running.
      5909ade1
    • Karel Koci's avatar
      nsfarm/mterm: suppress logging · 71785f37
      Karel Koci authored
      It is common that tests are run with logs printed to terminal. It helps
      developer to see what is actually happening.
      The problem is that log printing interferes with terminal output. It
      should be safe to set level of root logger such it prints no messages
      for time of mterm execution.
      71785f37
    • Karel Koci's avatar
      nsfarm/lxd: improve warning about image bootstrap · f3f0e88f
      Karel Koci authored
      The message was being printed almost right on prepare method enter. The
      problem is that it was called before parent image prepare method was
      called. In effect this generated messages in reverse order. It also made
      it pretty much impossible to identify which container exactly failed to
      prepare as warnings for all images were printed even before any of them
      started actually preparing. This moves it after parent prepare method
      call and thus makes it so prepare messages are printed in order and
      right before actual work is being performed.
      
      This also gives us the option to include full container name we use for
      bootstrapping.
      f3f0e88f
    • Karel Koci's avatar
      nsfarm/mterm: fix invalid semicolon command in Shell · 93573aef
      Karel Koci authored
      Originally mterm was using just semicolon but bare semicolon is invalid
      in shell so it prints error. This instead passes decision of command to
      be used to specific Cli implementations.
      93573aef
    • Karel Koci's avatar
      tool.sh: add script to access more easilly nsfarm library tools · de5188d5
      Karel Koci authored
      The nsfarm library tools can be invoked by: python3 -m nsfarm
      This is pretty simple but it is not directly visible, the documentation
      has to be investigated to found this out, as well as not exactly short.
      Having this short script should do us no harm.
      de5188d5
    • Karel Koci's avatar
      tests/network/test_lan: wait for network before continuing · b0828c9b
      Karel Koci authored
      This should prevent hopefully failures when network is not yet up in the
      client container.
      b0828c9b
    • Karel Koci's avatar
      test_cryptowrapper: add some basic tests for crypto-wrapper · 8cc46caa
      Karel Koci authored
      It tests only if hardware type is correctly reported and if appropriate
      serial number is returned.
      
      This adds new requirement for configuration and that is serial number.
      We need this to verify that crypto-wrapper correctly returns appropriate
      number.
      8cc46caa
    • Karel Koci's avatar
      tests: improve reports · 466e943b
      Karel Koci authored
      This improves XML and HTML reports. It is minor expansion with required
      info: tested branch and target.
      466e943b
    • Karel Koci's avatar
      tests: remove serial and wan markers · 65c8fea6
      Karel Koci authored
      The only possible execution right now is with serial and wan present.
      In reality we need lan1 as well but we have to get around that because
      CPU only Mox.
      This simply removes parameters and marks for appropriate fixtures.
      The effect is just less marks as well as better tests reports as they no
      longer report None parameters.
      65c8fea6
    • Karel Koci's avatar
      configtest: remove inclusion of pytest_html · d3fe6c6a
      Karel Koci authored
      It seems that pytest_html is now included automatically and including it
      second time here produces warning.
      d3fe6c6a
    • Karel Koci's avatar
      tests: implement target autoselection · 5bc88a7f
      Karel Koci authored
      This reduces user's overhead to launch tests. It uses targets filtering.
      This makes target specification optional.
      At the moment user can specify that he wants to run tests on specific
      board. In the future we should add filters for additional configured
      board features, such as presence of Wi-Fi cards or USB storage device.
      5bc88a7f
    • Karel Koci's avatar
      nsfarm/target: move target parsing to nsfarm library · cff8fe91
      Karel Koci authored
      This not only moves target config parsing to nsfarm library but also it
      changes it to be implementation defined not just access to configparser.
      cff8fe91
  2. Mar 29, 2021
  3. Mar 18, 2021
    • Karel Koci's avatar
      selftests/lxd: add simple ping test for LXD container · 74051ebe
      Karel Koci authored
      The current tests check if appropriate profiles exists but not if they
      actually work. The nsfarm-root has to work when container at least
      starts. The problem is with nsfarm-internet. It is required to test if
      it is possible to access the Internet or not with that profile. That is
      exactly what this test does.
      74051ebe
  4. Mar 17, 2021
  5. Mar 16, 2021
    • Karel Koci's avatar
      nsfarm/lxd: include files in hash calculations · 2ecf2196
      Karel Koci authored
      There was for some reason condition that only directories are listed
      when image hash is generated. In reality the code was prepared to handle
      any path and should include all paths. This removes this invalid
      condition and makes it so all files provided for image are included in
      hash calculation.
      
      This in effect makes it so new image build is triggered on any file
      modification.
      2ecf2196
  6. Feb 25, 2021
    • Karel Koci's avatar
      nsfarm/lxd: rename exceptions · 0c9574a3
      Karel Koci authored
      The Python PEP8 specifies that exceptions should be named *Error so this
      renames the exceptions to match that.
      0c9574a3
    • Karel Koci's avatar
      selftests: check if devices are on system · e9f4a095
      Karel Koci authored
      This is just test that checks that we have all required devices on host
      system. These devices are optional and additional modules are requires
      to be installed and loaded to kernel.
      
      At the moment only the /dev/ppp is tested there.
      e9f4a095
    • Karel Koci's avatar
      nsfarm/lxd: add ability to pass character devices · f9b7d7dc
      Karel Koci authored
      There is change that adds device exclusivity. Only for few devices we
      need exclusive passtrough to container. In most cases it is enough to
      pass only access to that device.
      
      Another change is that there is possibility to specify parameter for
      images. At the moment this allows only passtrough of Unix character
      devices but that can be expanded in the future.
      f9b7d7dc
    • Karel Koci's avatar
      nsfarm/lxd: fix inspect command · d6c51516
      Karel Koci authored
      The arguments of Container class changed but they were  not updated
      here.
      d6c51516
    • Karel Koci's avatar
      imgs: update base-alpine to AlpineLinux 3.13 · b851b749
      Karel Koci authored
      b851b749
    • Karel Koci's avatar
      nsfarm/mterm: add micro terminal · 514ea66c
      Karel Koci authored
      The micro terminal is minimal connection between terminal and socket.
      This way it can be hooked up to any socket in nsfarm and thus allowing
      the direct access for CLI interfaces. The primary use is to access
      board's serial console.
      
      This replaces serial_miniterm with simpler and more generic implementation.
      514ea66c
    • Karel Koci's avatar
      nsfarm/cli: fix function pexpect_flush · 84e6788e
      Karel Koci authored
      It turns out that nonblocking doesn't mean nonblocking in all cases. In
      this case when there was no input the read was blocking.
      The timeout set to zero solves this.
      84e6788e
    • Karel Koci's avatar
      tests: reenable read of syslog on serial console · b2a9f818
      Karel Koci authored
      This now not only makes sense becuase we have live logging it also fixes
      TODO pointed there, we just wait for file to appear (syslog-ng to
      start).
      b2a9f818
    • Karel Koci's avatar
    • Karel Koci's avatar
      Replace logging trough pexpect with realtime logging · e1a30f22
      Karel Koci authored and Karel Koci's avatar Karel Koci committed
      Problem with logging trough pexpect is that we log output only when we
      expect it. That is when we access it trough pexpect. This means that
      time and synchronization when logs arrive from multiple sources can't be
      archived and only one source logs at the time (the one that is used
      currently by pexpect). This is not ideal as we are interested in
      situation such as restarting network interfaces that produce some logs
      not only on router but also in container at the same time.
      Synchronization on time bases in such cases is important and we can't
      wait for code to call pexpect to print it to logs later on.
      
      This instead utilizes sockets and by reading source immediately and just
      passing it to socket.
      e1a30f22
  7. Feb 22, 2021
  8. Jan 07, 2021
  9. Dec 22, 2020
  10. Jul 16, 2020
  11. Jul 15, 2020
Loading