From: Jeff King Date: Fri, 20 Mar 2015 10:10:21 +0000 (-0400) Subject: t: fix &&-chaining issues around setup which might fail X-Git-Tag: v2.4.0-rc0~1^2~28 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a6a4a88af0b99fec688f66256a2c23a15e110c1f?hp=a6a4a88af0b99fec688f66256a2c23a15e110c1f t: fix &&-chaining issues around setup which might fail Many tests have an initial setup step that might fail based on whether earlier tests in the script have succeeded or not. Using a trick like "|| true" breaks the &&-chain, missing earlier failures (and fooling --chain-lint). We can use test_might_fail in some cases, which is correct and makes the intent more obvious. We can also use test_unconfig for unsetting config (and which is more robust, as well). The case in t9500 is an oddball. It wants to run cmd1 _or_ cmd2, and does it like: cmd1 || cmd2 && other_stuff It's not wrong in this case, but it's a bad habit to get into, because it breaks the &&-chain if used anywhere except at the beginning of the test (and we use the correct solution here, putting it inside a block for precedence). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano ---