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

Re: [PATCH v2 2/3] t/*: avoid "whitelist"

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 19, 2022, 15:26 UTC
Message-ID
<220719.86lespun6l.gmgdl@evledraar.gmail.com>
In-Reply-To
<75cc0f43-d9a5-45d3-5e36-dd20acfebf50@github.com>
On Tue, Jul 19 2022, Derrick Stolee wrote:
Show 25 quoted lines
> On 7/15/2022 7:02 AM, Ævar Arnfjörð Bjarmason wrote:
>>>  GIT_TEST_PASSING_SANITIZE_LEAK=<boolean> when compiled with
>>> -SANITIZE=leak will run only those tests that have whitelisted
>>> -themselves as passing with no memory leaks. Tests can be whitelisted
>>> -by setting "TEST_PASSES_SANITIZE_LEAK=true" before sourcing
>>> -"test-lib.sh" itself at the top of the test script. This test mode is
>>> -used by the "linux-leaks" CI target.
>>> +SANITIZE=leak will run only those tests that have marked themselves as
>>> +passing with no memory leaks by setting "TEST_PASSES_SANITIZE_LEAK=true"
>>> +before sourcing "test-lib.sh" itself at the top of the test script. This
>>> +test mode is used by the "linux-leaks" CI target.
>> 
>> It's hard to improve your own verbage, but I think in this case my
>> original version can be improved still:
>> 
>> 	GIT_TEST_PASSING_SANITIZE_LEAK=<bool> when compiled with
>> 	SANITIZE=leak will, when true, only run those tests that declare
>> 	themselves leak-free by setting "TEST_PASSES_SANITIZE_LEAK=true"
>> 	before sourcing "test-lib.sh". This test mode is used by the
>> 	"linux-leaks" CI target.
>
> Another iteration:
>
>   GIT_TEST_PASSING_SANITIZE_LEAK=<bool> focuses the test suite on finding
>   memory leaks.

In some ways it does the opposite of "focusing on finding memory leaks", we're explicitly finding fewer memory leaks, what we're doing is asserting that the tests we've whitelisted still pass.

>   SANITIZE=leak, only run those tests that declare themselves leak-free by
>   setting "TEST_PASSES_SANITIZE_LEAK=true" before sourcing "test-lib.sh".
>   This test mode is used by the "linux-leaks" CI target.
Perhaps:
	GIT_TEST_PASSING_SANITIZE_LEAK=true skips those tests that
	haven't declared themselves as leak-free by setting
	"TEST_PASSES_SANITIZE_LEAK=true" before sourcing
	"test-lib.sh". This test mode is used by the "linux-leaks" CI
	target.
Anyway, do you mind if this part is dropped from this series?

I have a set of patches I was meaning to submit to add a tri-state [false,true,check] support for this, which this conflicts with.

"check" being a mode where we check that the tests in "false" aren't yet passing. So for that I'll need to re-word this whole thing anyway. I'll rephrase this while I'm at it to something I think you'll be OK with.

Show 12 quoted lines
>>> -test_description='test protocol whitelisting with submodules'
>>> +test_description='test protocol restrictions with submodules'
>> 
>> Minor: I think this shows the awkwardness of using a word derived from
>> "allow". Before we could use "whitelist" and "whitelisting"
>> consistentlry, but now you have "allowed", "allowlist", "restrictions"
>> etc.
>> 
>> I guess you could say "test protocol allowances..." or something? Meh.
>
> Perhaps "filtering" is the best way to describe the higher-level
> feature that these lists help to implement.

*Shrug*. I think "filtering" more naturally refers to the process, i.e. in Makefile syntax:

	$(filter-out $(A),$(LIST))
	$(filter $(B),$(LIST))

I'd call $(B) a whitelist (or whatever), $(A) a blacklist (or whatever), but "filtering" the process of producing them.

Previous: Derrick StoleeNext: Derrick Stolee
Message 25 of 38 in “Use "allowlist" and "denylist" tree-wide”
  1. 0/3 Use "allowlist" and "denylist" tree-wideDerrick Stolee via GitGitGadget, Jul 13, 2022
  2. 1/3 Documentation: use allowlist and denylistDerrick Stolee via GitGitGadget, Jul 13, 2022
  3. Jeff KingJul 13, 2022
  4. Derrick StoleeJul 13, 2022
  5. Junio C HamanoJul 13, 2022
  6. 2/3 t/*: use allowlistDerrick Stolee via GitGitGadget, Jul 13, 2022
  7. 3/3 *: use allowlist and denylistDerrick Stolee via GitGitGadget, Jul 13, 2022
  8. Johannes SchindelinJul 13, 2022
  9. Jeff KingJul 13, 2022
  10. Johannes SchindelinJul 13, 2022
  11. Junio C HamanoJul 13, 2022
  12. Derrick StoleeJul 13, 2022
  13. Junio C HamanoJul 13, 2022
  14. Ævar Arnfjörð BjarmasonJul 13, 2022
  15. Junio C HamanoJul 13, 2022
  16. Derrick StoleeJul 15, 2022
  17. Ævar Arnfjörð BjarmasonJul 13, 2022
  18. 0/3 Remove use of "whitelist"Derrick Stolee via GitGitGadget, Jul 15, 2022
  19. 1/3 Documentation: remove use of whitelistDerrick Stolee via GitGitGadget, Jul 15, 2022
  20. Ævar Arnfjörð BjarmasonJul 15, 2022
  21. Derrick StoleeJul 19, 2022
  22. 2/3 t/*: avoid "whitelist"Derrick Stolee via GitGitGadget, Jul 15, 2022
  23. Ævar Arnfjörð BjarmasonJul 15, 2022
  24. Derrick StoleeJul 19, 2022
  25. Ævar Arnfjörð BjarmasonJul 19, 2022
  26. Derrick StoleeJul 19, 2022
  27. Junio C HamanoJul 19, 2022
  28. 3/3 *: avoid "whitelist"Derrick Stolee via GitGitGadget, Jul 15, 2022
  29. Ævar Arnfjörð BjarmasonJul 15, 2022
  30. Junio C HamanoJul 15, 2022
  31. Phillip WoodJul 15, 2022
  32. 0/5 Remove use of "whitelist"Derrick Stolee via GitGitGadget, Jul 19, 2022
  33. 1/5 daemon: clarify directory argumentsDerrick Stolee via GitGitGadget, Jul 19, 2022
  34. 2/5 git-cvsserver: clarify directory listDerrick Stolee via GitGitGadget, Jul 19, 2022
  35. 3/5 git.txt: remove redundant languageDerrick Stolee via GitGitGadget, Jul 19, 2022
  36. Jeff KingJul 31, 2022
  37. 4/5 t: avoid "whitelist"Derrick Stolee via GitGitGadget, Jul 19, 2022
  38. 5/5 transport.c: avoid "whitelist"Derrick Stolee via GitGitGadget, Jul 19, 2022

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.