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

[PATCH 1/4] t7004: move limited stack prereq to test-lib

From
Michael J Gruber <git@grubix.eu>
Date
Sep 7, 2017, 14:02 UTC
Message-ID
<7917efead45441d5b3cb18b4d1608d5112445f62.1504792601.git.git@grubix.eu>
In-Reply-To
<c1cb526d-a567-b598-d980-5dbe695b7d6a@grubix.eu>
The lazy prerequisite  ULIMIT_STACK_SIZE is used only in t7004 so far.

Move it to test-lib.sh so that it can be used in other tests (which it will be in a follow-up commit).

Signed-off-by: Michael J Gruber <git@grubix.eu>
---
 t/t7004-tag.sh | 6 ------
 t/test-lib.sh  | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index dbcd6f623c..5bf5ace56b 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1863,12 +1863,6 @@ test_expect_success 'version sort with very long prerelease suffix' '
 	git tag -l --sort=version:refname
 '
 
-run_with_limited_stack () {
-	(ulimit -s 128 && "$@")
-}
-
-test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true'
-
 # we require ulimit, this excludes Windows
 test_expect_success ULIMIT_STACK_SIZE '--contains and --no-contains work in a deep repo' '
 	>expect &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 5fbd8d4a90..f22c1b260a 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1167,6 +1167,12 @@ run_with_limited_cmdline () {
 
 test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
 
+run_with_limited_stack () {
+	(ulimit -s 128 && "$@")
+}
+
+test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true'
+
 build_option () {
 	git version --build-options |
 	sed -ne "s/^$1: //p"
-- 
2.14.1.603.gf58147c36e
Previous: Michael J GruberNext: Michael J Gruber
Message 9 of 14 in “name-rev: change ULONG_MAX to TIME_MAX”
  1. name-rev: change ULONG_MAX to TIME_MAXMichael J Gruber, Aug 30, 2017
  2. Johannes SchindelinAug 30, 2017
  3. Junio C HamanoSep 6, 2017
  4. Michael J GruberSep 6, 2017
  5. Jeff KingSep 6, 2017
  6. Michael J GruberSep 7, 2017
  7. 2/4 t6120: test name-rev --all and --stdinMichael J Gruber, Sep 7, 2017
  8. 4/4 t6120: test describe and name-rev with deep reposMichael J Gruber, Sep 7, 2017
  9. 1/4 t7004: move limited stack prereq to test-libMichael J Gruber, Sep 7, 2017
  10. 3/4 t6120: clean up state after breaking repoMichael J Gruber, Sep 7, 2017
  11. 0/4 Test name-rev with small stackMichael J Gruber, Sep 7, 2017
  12. Jeff KingSep 7, 2017
  13. Michael J GruberSep 8, 2017
  14. Jeff KingSep 11, 2017

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.