Git Mailing List Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v3 0/8] fix test failure with busybox
@ 2020-03-25 15:06 Đoàn Trần Công Danh
  2020-03-25 15:06 ` [PATCH v3 1/8] t4061: use POSIX compliant regex(7) Đoàn Trần Công Danh
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Đoàn Trần Công Danh @ 2020-03-25 15:06 UTC (permalink / raw)
  To: git
  Cc: Đoàn Trần Công Danh, Eric Sunshine,
	Jeff King, Johannes Schindelin, Torsten Bögershausen,
	Junio C Hamano

Despite non-compiance from busybox's sh(1), grep(1), diff(1), find(1)
Alpine Linux is still a popular choice for container these days.

Fix false-positive failure in testsuite when run in Alpine Linux.

Đoàn Trần Công Danh (8):
  t4061: use POSIX compliant regex(7)
  test-lib-functions: test_cmp: eval $GIT_TEST_CMP
  t5003: drop the subshell in test_lazy_prereq
  t5003: skip conversion test if unzip -a is unavailable
  t5616: use rev-parse instead to get HEAD's object_id
  t7063: drop non-POSIX argument "-ls" from find(1)
  t4124: fix test for non-compliant diff(1)
  t5703: feed raw data into test-tool unpack-sideband

 t/helper/test-pkt-line.c           |  2 +-
 t/t4061-diff-indent.sh             |  2 +-
 t/t4124-apply-ws-rule.sh           |  6 ++++++
 t/t5003-archive-zip.sh             | 24 ++++++++++++------------
 t/t5616-partial-clone.sh           |  2 +-
 t/t5703-upload-pack-ref-in-want.sh |  5 +----
 t/t7063-status-untracked-cache.sh  |  2 +-
 t/test-lib-functions.sh            |  2 +-
 8 files changed, 24 insertions(+), 21 deletions(-)

Range-diff against v2:
1:  34f96548de = 1:  088905ab6f t4061: use POSIX compliant regex(7)
2:  50f46986a6 = 2:  691d9d47ba test-lib-functions: test_cmp: eval $GIT_TEST_CMP
3:  8719a07753 = 3:  759a589b83 t5003: drop the subshell in test_lazy_prereq
4:  457eecaf9b = 4:  e5b09c290c t5003: skip conversion test if unzip -a is unavailable
5:  d3bc855e17 = 5:  1b8740018c t5616: use rev-parse instead to get HEAD's object_id
6:  64472ec3bc ! 6:  abb21b9e51 t7063: drop non-POSIX argument "-ls" from find(1)
    @@ Commit message
         However, `-ls` flag isn't required by POSIX's find(1), and
         busybox(1) doesn't implement it.
     
    -    From the original conversation, it seems like find(1) with "-type d"
    -    could trigger enough "lstat(2)" to ask FreeBSD update mtime.
    -
    -    Use only filter "-type d" for now.
    +    Use "-exec ls -ld {} +" instead.
     
         Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
     
    @@ t/t7063-status-untracked-cache.sh: GIT_FORCE_UNTRACKED_CACHE=true
      
      sync_mtime () {
     -	find . -type d -ls >/dev/null
    -+	find . -type d >/dev/null
    ++	find . -type d -exec ls -ld {} + >/dev/null
      }
      
      avoid_racy() {
7:  51df6dd12d ! 7:  0502171f0f t4124: fix test for non-compliant diff(1)
    @@ Commit message
         POSIX's diff(1) requires output in normal diff format.
         However, busybox's diff's output is written in unified format.
     
    -    POSIX requires no option for normal-diff format.
    +    HP-UX's diff(1) doesn't understand "-u" as of now.
     
    -    A hint in test-lib-functions::test_cmp said `diff -u` isn't available
    -    everywhere.
    -
    -    Workaround this problem by assuming `diff(1)` output is unified
    +    Workaround this problem by checking "diff -u" output,
         if we couldn't make anything from normal-diff format.
     
         Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
    @@ t/t4124-apply-ws-rule.sh: test_fix () {
      
      	# find touched lines
      	$DIFF file target | sed -n -e "s/^> //p" >fixed
    -+	# busybox's diff(1) output unified format
    ++	# busybox's diff(1) doesn't output normal format
     +	if ! test -s fixed; then
    -+		$DIFF file target |
    ++		$DIFF -u file target |
     +		grep -v '^+++ target' |
     +		sed -e "/^+/s/+//" >fixed
     +	fi
8:  843c7f66d9 = 8:  8689e03400 t5703: feed raw data into test-tool unpack-sideband
-- 
2.26.0.rc2.357.g1e1ba0441d


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25 15:06 [PATCH v3 0/8] fix test failure with busybox Đoàn Trần Công Danh
2020-03-25 15:06 ` [PATCH v3 1/8] t4061: use POSIX compliant regex(7) Đoàn Trần Công Danh
2020-03-25 15:06 ` [PATCH v3 2/8] test-lib-functions: test_cmp: eval $GIT_TEST_CMP Đoàn Trần Công Danh
2020-03-25 15:06 ` [PATCH v3 3/8] t5003: drop the subshell in test_lazy_prereq Đoàn Trần Công Danh
2020-03-25 15:06 ` [PATCH v3 4/8] t5003: skip conversion test if unzip -a is unavailable Đoàn Trần Công Danh
2020-03-25 15:06 ` [PATCH v3 5/8] t5616: use rev-parse instead to get HEAD's object_id Đoàn Trần Công Danh
2020-03-25 15:06 ` [PATCH v3 6/8] t7063: drop non-POSIX argument "-ls" from find(1) Đoàn Trần Công Danh
2020-03-25 15:06 ` [PATCH v3 7/8] t4124: fix test for non-compliant diff(1) Đoàn Trần Công Danh
2020-03-25 15:06 ` [PATCH v3 8/8] t5703: feed raw data into test-tool unpack-sideband Đoàn Trần Công Danh

Git Mailing List Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/git/0 git/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 git git/ https://lore.kernel.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.git


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git