pmdaproc: handle command names containing whitespace
commit6adb339ae2db9eb2cdbe4ad382557c9cfb8f8371
authorNathan Scott <nathans@redhat.com>
Wed, 29 Jun 2016 01:50:01 +0000 (29 11:50 +1000)
committerNathan Scott <nathans@redhat.com>
Wed, 29 Jun 2016 01:50:01 +0000 (29 11:50 +1000)
tree6da1e33eb53f5b58df17c75c282e20e4fa4a4f06
parentd512ce1812e961d7340201549bbd87472c70a0be
pmdaproc: handle command names containing whitespace

The brace-enclosed command name passed out from kernel
stats files like /proc/pid/stat can contain whitespace,
which we were not handling.  This resulted in incorrect
values being passed out, as the field indexing was off.

Add more test data, a new test case and update existing
test 974 to exercise the revised code.

Resolves Fedora BZ #1350816.
qa/852 [copied from qa/974 with 50% similarity]
qa/852.out [new file with mode: 0644]
qa/974
qa/974.out
qa/group
qa/linux/procpid-4.2.3-root-004.tgz [new file with mode: 0644]
src/pmdas/linux_proc/pmda.c
src/pmdas/linux_proc/proc_pid.c