From 97f84a6cb2799903db0abdd6ead01f58a67ccacd Mon Sep 17 00:00:00 2001 From: Peter Gerber Date: Wed, 29 Jul 2020 06:12:08 +0000 Subject: [PATCH] Stop relying on `false` exiting with status code 1 According to the manpage, it's only guaranteed to return with an exit code indicating an error. However, the manpage is silent on the exact code returned. Likely fixes #5273. --- src/borg/testsuite/archiver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index a234d4c9b..d749c8abf 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -1060,8 +1060,8 @@ class ArchiverTestCase(ArchiverTestCaseBase): def test_create_content_from_command_with_failed_command(self): self.cmd('init', '--encryption=repokey', self.repository_location) output = self.cmd('create', '--content-from-command', self.repository_location + '::test', - '--', 'false', '--arg-passed-to-false', exit_code=2) - assert output.endswith("Command 'false' exited with status 1\n") + '--', 'sh', '-c', 'exit 73;', exit_code=2) + assert output.endswith("Command 'sh' exited with status 73\n") archive_list = json.loads(self.cmd('list', '--json', self.repository_location)) assert archive_list['archives'] == []