1import lldb 2from lldbsuite.test.lldbtest import * 3from lldbsuite.test.decorators import * 4 5 6class InvalidArgsLogTestCase(TestBase): 7 @no_debug_info_test 8 def test_enable_empty(self): 9 self.expect( 10 "log enable", 11 error=True, 12 substrs=[ 13 "error: log enable takes a log channel and one or more log types." 14 ], 15 ) 16 17 @no_debug_info_test 18 def test_disable_empty(self): 19 self.expect( 20 "log disable", 21 error=True, 22 substrs=[ 23 "error: log disable takes a log channel and one or more log types." 24 ], 25 ) 26 27 @no_debug_info_test 28 def test_enable_invalid_path(self): 29 invalid_path = os.path.join("this", "is", "not", "a", "valid", "path") 30 self.expect( 31 "log enable lldb all -f " + invalid_path, 32 error=True, 33 substrs=["Unable to open log file '" + invalid_path + "': ", "\n"], 34 ) 35