Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

SubOptimal
Copy link
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