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

Re: [PATCH] test-lib: fix non-functioning GIT_TEST_MAINT_SCHEDULER fallback

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 31, 2024, 06:51 UTC
Message-ID
<CAPig+cQApMC_UEgee06e=jbu9VoNHQT10hCU1OAQtpn1W7Fqmw@mail.gmail.com>
In-Reply-To
<20240329222703.9343-1-ericsunshine@charter.net>
On Fri, Mar 29, 2024 at 6:27 PM Eric Sunshine <ericsunshine@charter.net> wrote:
Show 20 quoted lines
> When environment variable GIT_TEST_MAINT_SCHEDULER is set, `git
> maintenance` invokes the command specified as the variable's value
> rather than invoking the actual underlying platform-specific scheduler
> management command. By setting GIT_TEST_MAINT_SCHEDULER to some suitable
> value, test authors can therefore validate behavior of "destructive"
> `git maintenance` commands without having to worry about clobbering the
> user's own local scheduler configuration.
>
> In order to protect an absent-minded test author from forgetting to set
> GIT_TEST_MAINT_SCHEDULER in the local test script (and thus clobbering
> his or her own scheduler configuration), t/test-lib.sh assigns an
> "immediately error-out" value to GIT_TEST_MAINT_SCHEDULER by default
> which should ensure that the problem will be caught and reported before
> any damage can be done to the configuration of the person running the
> tests.
>
> Unfortunately, however, t/test-lib.sh neglects to export
> GIT_TEST_MAINT_SCHEDULER, which renders the default "error-out"
> assignment worthles. Fix this by exporting the variable as originally
> intended.
s/worthles/worthless/
(I won't reroll just for this minor typo.)
Previous: Eric Sunshine
Message 5 of 5 in “do not set GIT_TEST_MAINT_SCHEDULER where it does not matter”
  1. do not set GIT_TEST_MAINT_SCHEDULER where it does not matterJunio C Hamano, Mar 29, 2024
  2. Eric SunshineMar 29, 2024
  3. Junio C HamanoMar 29, 2024
  4. test-lib: fix non-functioning GIT_TEST_MAINT_SCHEDULER fallbackEric Sunshine, Mar 29, 2024
  5. Eric SunshineMar 31, 2024

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.