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

Re: [PATCH 6/7] t5541: move run_with_cmdline_limit to test-lib.sh

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 13, 2015, 06:45 UTC
Message-ID
<CAPig+cQg8yhSAVi5w1w967iyTxYEgXBnSYw7wFoV0GqTk9KP+A@mail.gmail.com>
In-Reply-To
<20150313045307.GF18532@peff.net>
On Fri, Mar 13, 2015 at 12:53 AM, Jeff King <peff@peff.net> wrote:
Show 11 quoted lines
> We use this to test http pushing with a restricted
> commandline. Other scripts (like t5551, which does http
> fetching) will want to use it, too.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> As we discussed a while ago, this is the exact same code that
> run_with_limited_stack uses in t7004. However, I think they are
> conceptually two different things, and I could imagine a platform where
> they have distinct implementations. So I did not refactor t7004 to make
> use of this.

Perhaps this commentary should be moved to the commit message so that the next person who notices that run_with_limited_stack() is the same will understand why it was left alone.

Show 37 quoted lines
>  t/t5541-http-push-smart.sh | 6 ------
>  t/test-lib.sh              | 6 ++++++
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh
> index d2c681e..1ecb588 100755
> --- a/t/t5541-http-push-smart.sh
> +++ b/t/t5541-http-push-smart.sh
> @@ -324,12 +324,6 @@ test_expect_success 'push into half-auth-complete requires password' '
>         test_cmp expect actual
>  '
>
> -run_with_limited_cmdline () {
> -       (ulimit -s 128 && "$@")
> -}
> -
> -test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
> -
>  test_expect_success CMDLINE_LIMIT 'push 2000 tags over http' '
>         sha1=$(git rev-parse HEAD) &&
>         test_seq 2000 |
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index 7dd4b4d..9914d3e 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -1062,3 +1062,9 @@ test_lazy_prereq UNZIP '
>         "$GIT_UNZIP" -v
>         test $? -ne 127
>  '
> +
> +run_with_limited_cmdline () {
> +       (ulimit -s 128 && "$@")
> +}
> +
> +test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
> --
> 2.3.2.472.geadab3c
Previous: Jeff KingNext: Jeff King
Message 9 of 12 in “fix transfer.hiderefs with smart http”
  1. 0/7 fix transfer.hiderefs with smart httpJeff King, Mar 13, 2015
  2. 1/7 upload-pack: fix transfer.hiderefs over smart-httpJeff King, Mar 13, 2015
  3. Junio C HamanoMar 13, 2015
  4. 2/7 upload-pack: do not check NULL return of lookup_unknown_objectJeff King, Mar 13, 2015
  5. 3/7 t: translate SIGINT to an exitJeff King, Mar 13, 2015
  6. 4/7 t: redirect stderr GIT_TRACE to descriptor 4Jeff King, Mar 13, 2015
  7. 5/7 t: pass GIT_TRACE through ApacheJeff King, Mar 13, 2015
  8. 6/7 t5541: move run_with_cmdline_limit to test-lib.shJeff King, Mar 13, 2015
  9. Eric SunshineMar 13, 2015
  10. 7/7 t5551: make EXPENSIVE test cheaperJeff King, Mar 13, 2015
  11. Jeff KingMar 13, 2015
  12. Duy NguyenMar 13, 2015

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.