[PATCH 23/27] t3600: mark git command as failing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In a future patch, we plan on running tests with `set -o pipefail`.
Since we intentionally induce SIGPIPE, before the return code
was being masked away. However, now `git rm` will cause an error code to
be returned because of the SIGPIPE.

Mark the failing command with `test_must_fail ok=sigpipe` so that
failures induced by SIGPIPE don't propogate.

Signed-off-by: Denton Liu <liu.denton@xxxxxxxxx>
---
 t/t3600-rm.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 0ea858d652..d1b3703edb 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -252,7 +252,7 @@ test_expect_success 'choking "git rm" should not let it die with cruft' '
 		i=$(( $i + 1 ))
 	done | git update-index --index-info &&
 	# git command is intentionally placed upstream of pipe to induce SIGPIPE
-	git rm -n "some-file-*" | : &&
+	test_must_fail ok=sigpipe git rm -n "some-file-*" | : &&
 	test_path_is_missing .git/index.lock
 '
 
-- 
2.24.0.399.gf8350c9437




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux