Bug ID 48049
Summary platform shell doesn’t fail if the shell command fails
Product lldb
Version 11.0
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter david.spickett@linaro.org
CC jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
In an interactive shell we get all the output you'd expect:
$ ./bin/lldb
(lldb) platform shell not_a_cmd
/bin/bash: not_a_cmd: command not found
error: command returned with status 127
But when using the API (via the test framework) the command is marked as
succeeded even though it failed on the platform:
@no_debug_info_test
+ def test_shell_command_failure(self):
+ """ Test that the platform shell command passes on command failures"""
+ triple = self.dbg.GetSelectedPlatform().GetTriple()
+ # TODO: windows/android like above
+ self.runCmd("platform shell definitley_not_a_command", check=False)
+ self.assertFalse(self.res.Succeeded())
FAIL: test_shell_command_failure (TestPlatformCommand.PlatformCommandTestCase)
Test that the platform shell command passes on command failures