1. 22 Aug, 2022 2 commits
  2. 17 Aug, 2022 1 commit
    • Christian Kellner's avatar
      tests: avoid multiple g_log_set_writer_func calls · 5056324e
      Christian Kellner authored
      Apparently calling `g_log_set_writer_func` was never meant to be
      called more than once, even though it worked just fine. Work
      around this by introducing another level of indirection: A new
      `TestContext` struct is passed to all tests as `user_data` and
      in this we save keep track of the current logger. It is reset
      to the standard logger for the tests in the test's setup
      function.
      NB: since the test data is passed via `gconstpointer` we need
      to explicitly cast the const away. This is ok since the actual
      `TestContext` object is non-const.
      5056324e
  3. 25 May, 2022 1 commit
    • Christian Kellner's avatar
      tests/integration: fix running with systemd 251 · 7421f0eb
      Christian Kellner authored
      udev/systemd, starting version 251 (a791061) started to verify that
      paths are actually on sysfs, i.e. the fs type is SYSFS_MAGIC. Since
      we use umockdev to emulate sysfs on normal file system this check
      will now fail. There is an exit hatch in form of an environment
      variable called `SYSTEMD_DEVICE_VERIFY_SYSFS` that when set to `0`
      makes systemd/udev forgo that check.  umockdev >= 0.17.10 does set
      that variable itself but in Python changes to the env by libraries
      does not effect the env of the running script. Thus we have to set
      it ourselves.
      7421f0eb
  4. 27 Jan, 2022 3 commits
  5. 04 Dec, 2021 1 commit
  6. 16 Sep, 2021 1 commit
  7. 16 Aug, 2021 11 commits
  8. 09 Jul, 2021 1 commit
  9. 06 May, 2021 2 commits
  10. 03 May, 2021 2 commits
  11. 07 Dec, 2020 1 commit
    • Christian Kellner's avatar
      test/common: conditionally re-enable atime checks · c2f1d5c4
      Christian Kellner authored
      The checks for modifying the access time via bolt_fs_touch was
      previously disabled because it did not work on file-systems
      that have the noatime flag set (for very obvious reasons).
      Separate these checks out and re-enable them but make their
      execution depended on the file-system support for access times,
      as reported via statvfs(2).
      c2f1d5c4
  12. 06 Dec, 2020 1 commit
    • Robert Hensing's avatar
      test: Disable filesystem access time checks · e2962df4
      Robert Hensing authored
      Access time is not always supported, so support for it is best-effort.
      We disable such assertions so bolt can be unit tested on systems that have
      "noatime" configured to speed up the filesystem.
      e2962df4
  13. 01 Dec, 2020 8 commits
  14. 30 Nov, 2020 5 commits
    • Christian Kellner's avatar
      test/mock: plug another tiny leak · c687041c
      Christian Kellner authored
      When removing the host device via mock_sysfs_host_remove, destroy
      the MockDevice for the host.
      c687041c
    • Christian Kellner's avatar
      glue: fix memory leak in conv_flags_to_str · 0b97bcaa
      Christian Kellner authored
      The function 'bolt_flags_class_to_string' returns a dynamically
      allocated string. This was previously not freed, creating a memory
      leak. Its ownership is now correctly transferred to the GVariant
      instead.
      0b97bcaa
    • Christian Kellner's avatar
      glue: plug tiny memory leak by freeing custom_id · 27ae4440
      Christian Kellner authored
      The memory for custom_id, to identify a custom conversion, is
      dynamically allocated, but was not freed in bolt_wire_conv_unref.
      Explicitly set it to NULL in the other constructor so we don't
      attempt to free invalid memory.
      27ae4440
    • Christian Kellner's avatar
      guard: ensure guard->path is always freed · 6f7b323f
      Christian Kellner authored
      Normally 'path' gets freed in bolt_guard_remove, which is called
      from the dispose method of the BoltGuard. There is one exception
      though: when the pipe (named fifo) is still active, we do not
      unlink the path, since we want to recover that guard later. In
      that case the memory for path will be leaked. Add an additional
      g_clear_pointer for path in the 'finalize' method to ensure that
      path always gets freed.
      6f7b323f
    • Christian Kellner's avatar
      guard: add pre-condition check in guard_save · 48cdeb20
      Christian Kellner authored
      Ensure that we are not saved already in 'bolt_guard_save'.
      48cdeb20