From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com> To: git@vger.kernel.org Cc: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>, "Eric Sunshine" <sunshine@sunshineco.com>, "Jeff King" <peff@peff.net>, "Johannes Schindelin" <Johannes.Schindelin@gmx.de>, "Torsten Bögershausen" <tboegi@web.de>, "Junio C Hamano" <gitster@pobox.com> Subject: [PATCH v4 0/8] fix test failure with busybox Date: Thu, 26 Mar 2020 11:37:30 +0700 Message-ID: <cover.1585197360.git.congdanhqx@gmail.com> (raw) In-Reply-To: <cover.1584838148.git.congdanhqx@gmail.com> Please ignore v3, there is an incorrect change in t4124. I found it when working on travis for linux-musl 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 v3: -: ---------- > 1: 780308d060 t3404: use test_cmp_rev -: ---------- > 2: 5b7a64df40 cherry-pick: add test for `--skip` advice in `git commit` -: ---------- > 3: f028d661c7 cherry-pick: check commit error messages -: ---------- > 4: 21b11c6d1d sequencer: write CHERRY_PICK_HEAD for reword and edit -: ---------- > 5: 8d57f75749 commit: use enum value for multiple cherry-picks -: ---------- > 6: 901ba7b1ef commit: encapsulate determine_whence() for sequencer -: ---------- > 7: 430b75f720 commit: give correct advice for empty commit during a rebase -: ---------- > 8: 0b4396f068 git-p4: make python2.7 the oldest supported version -: ---------- > 9: 484d09c303 git-p4: change the expansion test from basestring to list -: ---------- > 10: 1f8b46d0a4 git-p4: remove string type aliasing -: ---------- > 11: 6cec21a82f git-p4: encode/decode communication with p4 for python3 -: ---------- > 12: 86dca24b7b git-p4: encode/decode communication with git for python3 -: ---------- > 13: d38208a297 git-p4: convert path to unicode before processing them -: ---------- > 14: 5a5577d808 git-p4: open .gitp4-usercache.txt in text mode -: ---------- > 15: 50da1e7393 git-p4: use marshal format version 2 when sending to p4 -: ---------- > 16: 4294d741cc git-p4: fix freezing while waiting for fast-import progress -: ---------- > 17: a6b1306735 git-p4: use functools.reduce instead of reduce -: ---------- > 18: 2e2aa8d903 git-p4: use dict.items() iteration for python3 compatibility -: ---------- > 19: ce425eb4e1 git-p4: simplify regex pattern generation for parsing diff-tree -: ---------- > 20: 7575f4fdec git-p4: use python3's input() everywhere -: ---------- > 21: 06ac2b3b6e advice: extract vadvise() from advise() -: ---------- > 22: fef0c76f18 advice: change "setupStreamFailure" to "setUpstreamFailure" -: ---------- > 23: b3b18d1621 advice: revamp advise API -: ---------- > 24: f665d63a91 tag: use new advice API to check visibility -: ---------- > 25: 88238e02d5 http: add client cert support for HTTPS proxies -: ---------- > 26: af026519c9 http: add environment variable support for HTTPS proxies -: ---------- > 27: 0915a5b4cd set_git_dir: fix crash when used with real_path() -: ---------- > 28: 564956f358 update how-to-maintain-git -: ---------- > 29: 6bb40ed20a ci: use python3 in linux-gcc and osx-gcc and python2 elsewhere -: ---------- > 30: 3d7747e318 real_path: remove unsafe API -: ---------- > 31: 4530a85b4c real_path_if_valid(): remove unsafe API -: ---------- > 32: 49d3c4b481 get_superproject_working_tree(): return strbuf -: ---------- > 33: 7422b2a0a1 commit-slab: clarify slabname##_peek()'s return value -: ---------- > 34: 9c688735f6 pull: document more passthru options -: ---------- > 35: b739d971e5 connected.c: reprepare packs for corner cases -: ---------- > 36: 757c2ba3e2 oidset: remove unnecessary include -: ---------- > 37: 8312aa7d74 separate tar.* config to its own source file -: ---------- > 38: d00a5bdd50 submodule--helper.c: Rename 'cb_foreach' to 'foreach_cb' -: ---------- > 39: a7d14a4428 The first batch post 2.26 cycle 1: 34f96548de = 40: 08839cac15 t4061: use POSIX compliant regex(7) 2: 50f46986a6 = 41: 31d4a9b2e8 test-lib-functions: test_cmp: eval $GIT_TEST_CMP 3: 8719a07753 = 42: f871a7f395 t5003: drop the subshell in test_lazy_prereq 4: 457eecaf9b = 43: bc6bcc786d t5003: skip conversion test if unzip -a is unavailable 5: d3bc855e17 = 44: c6f7498d93 t5616: use rev-parse instead to get HEAD's object_id 6: 64472ec3bc ! 45: b3acf4adcf 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 ! 46: 02c115e93a 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 ++ sed -ne "/^+/s/+//p" >fixed + fi # the changed lines are all expected to change 8: 843c7f66d9 = 47: 2b8e75aaa5 t5703: feed raw data into test-tool unpack-sideband -- 2.26.0.rc2.357.g1e1ba0441d
next prev parent reply other threads:[~2020-03-26 4:37 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-22 0:55 [PATCH v2 " Đoàn Trần Công Danh 2020-03-22 0:55 ` [PATCH v2 1/8] t4061: use POSIX compliant regex(7) Đoàn Trần Công Danh 2020-03-22 0:55 ` [PATCH v2 2/8] test-lib-functions: test_cmp: eval $GIT_TEST_CMP Đoàn Trần Công Danh 2020-03-22 0:55 ` [PATCH v2 3/8] t5003: drop the subshell in test_lazy_prereq Đoàn Trần Công Danh 2020-03-22 0:55 ` [PATCH v2 4/8] t5003: skip conversion test if unzip -a is unavailable Đoàn Trần Công Danh 2020-03-22 0:55 ` [PATCH v2 5/8] t5616: use rev-parse instead to get HEAD's object_id Đoàn Trần Công Danh 2020-03-22 0:55 ` [PATCH v2 6/8] t7063: drop non-POSIX argument "-ls" from find(1) Đoàn Trần Công Danh 2020-03-23 14:11 ` Johannes Schindelin 2020-03-23 14:37 ` Torsten Bögershausen 2020-03-23 15:11 ` Danh Doan 2020-03-23 20:30 ` Junio C Hamano 2020-03-23 15:55 ` Junio C Hamano 2020-03-24 22:31 ` Johannes Schindelin 2020-03-24 23:46 ` Junio C Hamano 2020-03-22 0:55 ` [PATCH v2 7/8] t4124: fix test for non-compliant diff(1) Đoàn Trần Công Danh 2020-03-23 13:58 ` Johannes Schindelin 2020-03-23 15:04 ` Danh Doan 2020-03-23 20:50 ` Junio C Hamano 2020-03-24 3:40 ` Danh Doan 2020-03-24 18:47 ` Junio C Hamano 2020-03-25 14:24 ` Danh Doan 2020-03-24 22:29 ` Johannes Schindelin 2020-03-24 23:37 ` Junio C Hamano 2020-03-25 18:23 ` Johannes Schindelin 2020-03-22 0:55 ` [PATCH v2 8/8] t5703: feed raw data into test-tool unpack-sideband Đoàn Trần Công Danh 2020-03-22 6:08 ` [PATCH v2 0/8] fix test failure with busybox Jeff King 2020-03-26 4:37 ` Đoàn Trần Công Danh [this message] 2020-03-26 4:37 ` [PATCH v4 1/8] t4061: use POSIX compliant regex(7) Đoàn Trần Công Danh 2020-03-26 4:37 ` [PATCH v4 2/8] test-lib-functions: test_cmp: eval $GIT_TEST_CMP Đoàn Trần Công Danh 2020-03-26 4:37 ` [PATCH v4 3/8] t5003: drop the subshell in test_lazy_prereq Đoàn Trần Công Danh 2020-03-26 4:37 ` [PATCH v4 4/8] t5003: skip conversion test if unzip -a is unavailable Đoàn Trần Công Danh 2020-03-26 4:37 ` [PATCH v4 5/8] t5616: use rev-parse instead to get HEAD's object_id Đoàn Trần Công Danh 2020-03-26 4:37 ` [PATCH v4 6/8] t7063: drop non-POSIX argument "-ls" from find(1) Đoàn Trần Công Danh 2020-03-26 4:37 ` [PATCH v4 7/8] t4124: fix test for non-compliant diff(1) Đoàn Trần Công Danh 2020-03-27 1:18 ` Junio C Hamano 2020-03-26 4:37 ` [PATCH v4 8/8] t5703: feed raw data into test-tool unpack-sideband Đoàn Trần Công Danh
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=cover.1585197360.git.congdanhqx@gmail.com \ --to=congdanhqx@gmail.com \ --cc=Johannes.Schindelin@gmx.de \ --cc=git@vger.kernel.org \ --cc=gitster@pobox.com \ --cc=peff@peff.net \ --cc=sunshine@sunshineco.com \ --cc=tboegi@web.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
git@vger.kernel.org list mirror (unofficial, one of many) This inbox may be cloned and mirrored by anyone: git clone --mirror https://public-inbox.org/git git clone --mirror http://ou63pmih66umazou.onion/git git clone --mirror http://czquwvybam4bgbro.onion/git git clone --mirror http://hjrcffqmbrq6wope.onion/git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V1 git git/ https://public-inbox.org/git \ git@vger.kernel.org public-inbox-index git Example config snippet for mirrors. Newsgroups are available over NNTP: nntp://news.public-inbox.org/inbox.comp.version-control.git nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git nntp://news.gmane.io/gmane.comp.version-control.git note: .onion URLs require Tor: https://www.torproject.org/ code repositories for the project(s) associated with this inbox: https://80x24.org/mirrors/git.git AGPL code for this site: git clone https://public-inbox.org/public-inbox.git