The output that the test expects is wrong. We get ./xkbcli: illegal option -- foobar Usage: xkbcli [--help|-h] [--version|-V] [] ... here. Thus, remove the wrong expectations to make the test pass. --- libxkbcommon-xkbcommon-1.4.1/test/tool-option-parsing.py.orig 2022-05-21 21:55:22.000000000 +0000 +++ libxkbcommon-xkbcommon-1.4.1/test/tool-option-parsing.py 2022-11-13 11:02:58.556524894 +0000 @@ -111,8 +111,6 @@ def run_command_unrecognized_option(self, args): rc, stdout, stderr = self.run_command(args) assert rc == 2, (rc, stdout, stderr) - assert stdout.startswith('Usage') or stdout == '' - assert 'unrecognized option' in stderr def run_command_missing_arg(self, args): rc, stdout, stderr = self.run_command(args)