]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tests: test_pidfile.sh lingering processes 7734/head
authorLoic Dachary <ldachary@redhat.com>
Mon, 22 Feb 2016 04:38:46 +0000 (11:38 +0700)
committerLoic Dachary <ldachary@redhat.com>
Thu, 25 Feb 2016 05:24:00 +0000 (12:24 +0700)
commitc1e1c8d18e6c6257f870a1193307ae5f73764a59
treefb0781a22a44db0835070911d4d6a38797feeaeb
parentce1169d245e415d44aed25500b573aaed6fbc57a
tests: test_pidfile.sh lingering processes

For the mon, using ps aux to find the process will only show part of the
command line and the $RUNID may be missing. For the OSD, the $RUNID is
passed using an environment variable and will not show at all.

There is no need to test both ceph-osd and ceph-mon since they both end
up in the same code path, pidfile_write. Add a log line that only shows
when the --pid-file is empty and grep for it in the simplest possible
way.

The TEST_pidfile test failed to kill a process because there was
no pidfile with its pid. This is fixed by backuping the pidfile before
it is modified.

http://tracker.ceph.com/issues/14834 Fixes: #14834

Signed-off-by: Loic Dachary <loic@dachary.org>
src/global/pidfile.cc
src/test/test_pidfile.sh