pids tests: 'some-' is not that a unique pattern. (#6304)
* 'some-' is not that a unique pattern.
* Add debugging help.
* Avoid passing the name as a parameter to obtainpid.sh.
(cherry picked from commit 08f14f3eb0)
Co-authored-by: Felix Fontein <felix@fontein.de>