Merge pull request #54191 from garethgreenaway/test_program_test_mininion

[2019.2.1] Addition logging in testprogram used by integration.shell.test_minion.MinionTest.test_exit_status_correct_usage
This commit is contained in:
Daniel Wozniak 2019-08-13 14:44:40 -07:00 committed by GitHub
commit a05018e089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -828,6 +828,10 @@ class TestDaemon(TestProgram):
except psutils.AccessDenied:
# We might get access denied if not running as root
if not salt.utils.platform.is_windows():
pinfo = proc.as_dict(attrs=['pid', 'name', 'username'])
log.error('Unable to access process %s, '
'running command %s as user %s',
pinfo['pid'], pinfo['name'], pinfo['username'])
raise
if any((cmdline == proc_cmdline[n:n + cmd_len])
for n in range(len(proc_cmdline) - cmd_len + 1)):