aboutsummaryrefslogtreecommitdiffstats
path: root/tests/option_tests.py
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-09-16 20:15:04 +0100
committerBryn M. Reeves <bmr@redhat.com>2014-09-16 20:15:04 +0100
commitfe3c416205b9c07c42df6bdece35e22e0902d042 (patch)
treef28f923938c5f5702c6c9a70a6d2610396f3d834 /tests/option_tests.py
parentada9ca9514f97fe92a4dbcf2c51cf0f87f2194d2 (diff)
downloadsos-fe3c416205b9c07c42df6bdece35e22e0902d042.tar.gz
[utilities,plugin] check for return status 126
A return status of 126 indicates 'found but not executable'. This is returned from timeout for some malformed commands when running as a normal user but not when running as root, e.g.: Running 1/1: multipath... [plugin:multipath] collecting path '/etc/multipath/' [plugin:multipath] unpacked command tuple: ('['multipath -l', 'multipath -v4 -ll']', 'None', 'None', 300, 'None') [plugin:multipath] collecting output of '['multipath -l', 'multipath -v4 -ll']' Traceback (most recent call last): File "/usr/sbin/sosreport", line 25, in <module> main(sys.argv[1:]) File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1389, in main sos.execute() AttributeError: 'list' object has no attribute 'split' > /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(563)get_cmd_output_now() -> % (exe.split()[0], time() - start)) (Pdb) bt /usr/sbin/sosreport(25)<module>() -> main(sys.argv[1:]) /usr/lib/python2.7/site-packages/sos/sosreport.py(1389)main() -> sos.execute() /usr/lib/python2.7/site-packages/sos/sosreport.py(1369)execute() -> self.collect() /usr/lib/python2.7/site-packages/sos/sosreport.py(1144)collect() -> plug.collect() /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(633)collect() -> self._collect_cmd_output() /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(613)_collect_cmd_output() -> timeout=timeout, runat=runat) > /usr/lib/python2.7/site-packages/sos/plugins/__init__.py(563)get_cmd_output_now() -> % (exe.split()[0], time() - start)) (Pdb) result {'status': 126, 'output': u"timeout: failed to run command '[multipath -l,': Permission denied\n"} Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'tests/option_tests.py')
0 files changed, 0 insertions, 0 deletions