1. 16 Jan, 2017 35 commits
  2. 12 Jan, 2017 5 commits
    • Kirill Tkhai's avatar
      ns: Fix error return value in __get_ns_id() · 741719e8
      Kirill Tkhai authored
      Function has unsigned int return value, and error is coded by 0, not -1.
      
      travis-ci: success for ns: Fix error return value in __get_ns_id()
      Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
      741719e8
    • Dmitry Safonov's avatar
      zdtm/test: add infop to waitid() · 8cae4bdc
      Dmitry Safonov authored
      The man page says, it's not optional argument:
        The application shall ensure that the infop argument
        points to a siginfo_t structure.
      
      Fixes:
      Test output: ================================
      17:40:26.128:     5: FAIL: helper_zombie_child.c:33: waitid (errno = 14 (Bad address))
      17:40:26.128:     4: FAIL: helper_zombie_child.c:78: read (errno = 2 (No such file or directory))
      17:40:26.129:     3: ERR: test.c:229: Test exited unexpectedly with code 1
      
      Test output: ================================
      15:30:49.021:    30: ERR: sigpending.c:213: waitid (errno = 14 (Bad address))
      15:30:49.021:    29: ERR: test.c:229: Test exited unexpectedly with code 1
      
      and etc.
      
      travis-ci: success for 32-bit tests fixes
      Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
      Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
      8cae4bdc
    • Vitaly Ostrosablin's avatar
      test: add variable delta for poll.c test · ae48b5d6
      Vitaly Ostrosablin authored
      For ZDTM purposes, poll.c uses delta of 5 seconds, which is fine, since
      tests don't take a very long time to pass. However, in vzt-cpt, we start
      a batch with multitude of tests and starting them all could take over an
      hour. Hence, the test is bound to fail. An easy solution would be to
      introduce an environment variable, which would allow to specify the
      delta - ZDTM_DELTA. If it's unset (which is default behaviour in ZDTM) -
      it would default to 5 seconds. However, if it's set (what we can do from
      vzt-cpt) - then it will use delta which is set by our test.
      
      travis-ci: success for test: add variable delta for poll.c test (rev2)
      Signed-off-by: 's avatarVitaly Ostrosablin <vostrosablin@virtuozzo.com>
      Reviewed-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
      ae48b5d6
    • Andrei Vagin's avatar
      files: don't leak a file descriptor · 1418492f
      Andrei Vagin authored
      CID 173737 (#1 of 2): Resource leak (RESOURCE_LEAK)
      9. leaked_handle: Handle variable rmntns_root going out of scope leaks the handle.
      
      travis-ci: success for files: don't leak a file descriptor
      Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
      1418492f
    • Pavel Emelyanov's avatar
      page-server: Allow blocking on socket · a99b7c1b
      Pavel Emelyanov authored
      When splicing page server data from UNIX socket we may get
      error (EAGAIN) from splice if no data is available on the
      socket yet. This is because the SPLICE_F_NONBLOCK flag is
      checked by af_unix.c in the kernel to decide whether or
      not to do blocking read.
      
      This is not symmetrical with TCP sockets, which only check
      for the socket's O_NONBLOCK flag for the same decicion.
      
      Dropping the SPLICE_F_NONBLOCK flag is not possible too, as
      otherwise we'll block on the pipe when trying to put data
      into it. Even if part of the data fits into it kernel would
      block anyway untill full buffer is in. And there will be
      no read() from the pipe, as it should happen one step later
      in the same task.
      
      So to untie this, we need to wait for the data explicitly
      with poll().
      Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
      a99b7c1b