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

Re: [PATCH] CI: add SANITIZE=[address|undefined] jobs

From
Jeff King <peff@peff.net>
Date
Jul 27, 2022, 19:18 UTC
Message-ID
<YuGPeHn9wfF6tWA5@coredump.intra.peff.net>
In-Reply-To
<patch-1.1-e48b6853dd5-20220726T110716Z-avarab@gmail.com>
On Tue, Jul 26, 2022 at 01:09:13PM +0200, Ævar Arnfjörð Bjarmason wrote:
> Per [2] the GitHub fork of git.git runs with these in CI, so it's
> already useful to some forks of this repository.

Yeah, it has been helpful there and I think this is worth doing as part of our CI. It's a lot of CPU versus running the test suite once on Linux, but probably not compared to the overall cost of our current CI.

For the GitHub fork, the code-coverage issues you noticed were easy: we only built one variant, so we could just test with those knobs. ;) But I tend to agree with your approach here to just test on one platform, which covers _most_ of the code. It's certainly better than the status quo, and it strikes a nice balance of CPU versus coverage.

One thing I'd say...
Show 14 quoted lines
> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
> index cd1f52692a5..4f59a7aa44c 100644
> --- a/.github/workflows/main.yml
> +++ b/.github/workflows/main.yml
> @@ -251,6 +251,12 @@ jobs:
>            - jobname: linux-leaks
>              cc: gcc
>              pool: ubuntu-latest
> +          - jobname: SANITIZE=address
> +            cc: gcc
> +            pool: ubuntu-latest
> +          - jobname: SANITIZE=undefined
> +            cc: gcc
> +            pool: ubuntu-latest

There's really no reason to split the "address" and "undefined" builds into two jobs. We expect them to pass, and if one fails, having the results split is not likely to give any extra information. So I think one job with SANITIZE=address,undefined is fine, and reclaims some of the extra CPU we're spending.

-Peff
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 8 of 12 in “CI: add SANITIZE=[address|undefined] jobs”
  1. CI: add SANITIZE=[address|undefined] jobsÆvar Arnfjörð Bjarmason, Jul 26, 2022
  2. Derrick StoleeJul 26, 2022
  3. Ævar Arnfjörð BjarmasonJul 26, 2022
  4. Derrick StoleeJul 27, 2022
  5. Junio C HamanoJul 27, 2022
  6. Ævar Arnfjörð BjarmasonJul 28, 2022
  7. Junio C HamanoJul 28, 2022
  8. Jeff KingJul 27, 2022
  9. Ævar Arnfjörð BjarmasonJul 28, 2022
  10. Jeff KingJul 28, 2022
  11. Jeff KingJul 28, 2022
  12. Ævar Arnfjörð BjarmasonJul 28, 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.