1. 16 5月, 2016 35 次提交
  2. 14 5月, 2016 5 次提交
    • M
      tests: Introduce check-file-access.pl · 4b3a46ca
      Michal Privoznik 提交于
      This script will check output generated by virtestmock against a
      white list. All non matching records found are printed out. So
      far, the white list is rather sparse at the moment.
      This test should be ran only after all other tests finished, and
      should cleanup the temporary file before their execution. Because
      I'm unable to reflect these requirements in Makefile.am
      correctly, I've introduced new target 'check-access' under which
      this test is available.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      4b3a46ca
    • M
      virtestmock: Print invalid file accesses into a file · 6326865e
      Michal Privoznik 提交于
      All the accesses to files outside our build or source directories
      are now identified and appended into a file for later processing.
      The location of the file that contains all the records can be
      controlled via VIR_TEST_FILE_ACCESS env variable and defaults to
      abs_builddir "/test_file_access.txt".
      
      The script that will process the access file is to be added in
      next commit.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      6326865e
    • M
      tests: Introduce global mock library · 47d2dc83
      Michal Privoznik 提交于
      The intent is that this library is going to be called every time
      to check if we are not touching anything outside srcdir or
      builddir.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      47d2dc83
    • M
      virmock.h: Introduce VIR_MOCK_CALL_STAT · 86d1705a
      Michal Privoznik 提交于
      There is some magic going on when it comes to stat() or lstat().
      Basically, stat() can either be a regular function, an inline
      function that calls __xstat(_STAT_VER, ...) or a macro that does
      the same as the inline func. Don't ask why is that, just read the
      documentation in sys/stat.h and make sure you have a bucket next
      to you. Anyway, currently there will not be both stat and __xstat
      symbols at the same time, as one of them gets overwritten to the
      other one during compilation. But this is not true anymore once
      we start chaining our mocking libraries. Therefore we need a
      wrapper that calls desired function from glibc.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      86d1705a
    • M
      securityselinuxhelper: Adapt to virmock.h · a1ffedc6
      Michal Privoznik 提交于
      Instead of introducing our own wrapper for dlsym()
      we can use the one provided by virmock.h.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a1ffedc6