git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 6/8] t7063: drop non-POSIX argument "-ls" from find(1)

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Mar 22, 2020, 00:55 UTC
Message-ID
<59e3f73784b2a3bd9ccec87412e6178411c3708e.1584838148.git.congdanhqx@gmail.com>
In-Reply-To
<cover.1584838148.git.congdanhqx@gmail.com>

Since commit 6b7728db81, (t7063: work around FreeBSD's lazy mtime update feature, 2016-08-03), we started to use ls as a trick to update directory's mtime.

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.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
 t/t7063-status-untracked-cache.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh
index 190ae149cf..6791c6b95a 100755
--- a/t/t7063-status-untracked-cache.sh
+++ b/t/t7063-status-untracked-cache.sh
@@ -18,7 +18,7 @@ GIT_FORCE_UNTRACKED_CACHE=true
 export GIT_FORCE_UNTRACKED_CACHE
 
 sync_mtime () {
-	find . -type d -ls >/dev/null
+	find . -type d >/dev/null
 }
 
 avoid_racy() {
-- 
2.26.0.rc2.310.g2932bb562d
Previous: Đoàn Trần Công DanhNext: Johannes Schindelin
Message 7 of 36 in “fix test failure with busybox”
  1. 0/8 fix test failure with busyboxĐoàn Trần Công Danh, Mar 22, 2020
  2. 1/8 t4061: use POSIX compliant regex(7)Đoàn Trần Công Danh, Mar 22, 2020
  3. 3/8 t5003: drop the subshell in test_lazy_prereqĐoàn Trần Công Danh, Mar 22, 2020
  4. 2/8 test-lib-functions: test_cmp: eval $GIT_TEST_CMPĐoàn Trần Công Danh, Mar 22, 2020
  5. 4/8 t5003: skip conversion test if unzip -a is unavailableĐoàn Trần Công Danh, Mar 22, 2020
  6. 5/8 t5616: use rev-parse instead to get HEAD's object_idĐoàn Trần Công Danh, Mar 22, 2020
  7. 6/8 t7063: drop non-POSIX argument "-ls" from find(1)Đoàn Trần Công Danh, Mar 22, 2020
  8. Johannes SchindelinMar 23, 2020
  9. Torsten BögershausenMar 23, 2020
  10. Danh DoanMar 23, 2020
  11. Junio C HamanoMar 23, 2020
  12. Junio C HamanoMar 23, 2020
  13. Johannes SchindelinMar 24, 2020
  14. Junio C HamanoMar 24, 2020
  15. 7/8 t4124: fix test for non-compliant diff(1)Đoàn Trần Công Danh, Mar 22, 2020
  16. Johannes SchindelinMar 23, 2020
  17. Danh DoanMar 23, 2020
  18. Junio C HamanoMar 23, 2020
  19. Danh DoanMar 24, 2020
  20. Junio C HamanoMar 24, 2020
  21. Danh DoanMar 25, 2020
  22. Johannes SchindelinMar 24, 2020
  23. Junio C HamanoMar 24, 2020
  24. Johannes SchindelinMar 25, 2020
  25. 8/8 t5703: feed raw data into test-tool unpack-sidebandĐoàn Trần Công Danh, Mar 22, 2020
  26. Jeff KingMar 22, 2020
  27. 0/8 fix test failure with busyboxĐoàn Trần Công Danh, Mar 26, 2020
  28. 1/8 t4061: use POSIX compliant regex(7)Đoàn Trần Công Danh, Mar 26, 2020
  29. 2/8 test-lib-functions: test_cmp: eval $GIT_TEST_CMPĐoàn Trần Công Danh, Mar 26, 2020
  30. 3/8 t5003: drop the subshell in test_lazy_prereqĐoàn Trần Công Danh, Mar 26, 2020
  31. 4/8 t5003: skip conversion test if unzip -a is unavailableĐoàn Trần Công Danh, Mar 26, 2020
  32. 5/8 t5616: use rev-parse instead to get HEAD's object_idĐoàn Trần Công Danh, Mar 26, 2020
  33. 7/8 t4124: fix test for non-compliant diff(1)Đoàn Trần Công Danh, Mar 26, 2020
  34. Junio C HamanoMar 27, 2020
  35. 6/8 t7063: drop non-POSIX argument "-ls" from find(1)Đoàn Trần Công Danh, Mar 26, 2020
  36. 8/8 t5703: feed raw data into test-tool unpack-sidebandĐoàn Trần Công Danh, Mar 26, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.