Skip to content

Fix to get child process PID's regardless of their process name.#99

Merged
jahabibi merged 1 commit intomicrosoft:masterfrom
SubOptimal:issue_97
Aug 31, 2020
Merged

Fix to get child process PID's regardless of their process name.#99
jahabibi merged 1 commit intomicrosoft:masterfrom
SubOptimal:issue_97

Conversation

@SubOptimal
Copy link
Copy Markdown
Contributor

The Debian executable stress-ng is build with the options HAVE_BSD_UNISTD_H and HAVE_SETPROCTITLE. Those options
enables setting the process name to the stressor name.

Related makeconfig checks are

make -f Makefile.config --no-print-directory HAVE_CONFIG=1 HEADER=bsd/unistd.h have_header_h
make -f Makefile.config --no-print-directory HAVE_CONFIG=1 TEST_LIBS=-lbsd TEST_PROG=test-setproctitle have_test_prog

This change was introduced in stress-ng release V0.10.13 (see commit #f224f5db5).

Hence for example for the execution of stress-ng -c 1 -l 20 --timeout 20s -q the process names reported by ps are different

stress-ng before V0.10.13

stress-ng -c 1 -l 20 --timeout 20s -q
stress-ng -c 1 -l 20 --timeout 20s -q

stress-ng from V0.10.13

stress-ng -c 1 -l 20 --timeout 20s -q
stress-ng-cpu

Those changed process names are the reason why runProcDumpAndValidate.sh fails to find the children PID.
As the command to find the children PID does not cover the child processes.

childrenpid=$(pidof -o $pid stress-ng)

This PR fixes #97.

@jahabibi jahabibi merged commit 1c942ed into microsoft:master Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failures on Debian with "Invalid switch specified"

2 participants