Git development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Make our clar tests ignore the long-tests argument
@ 2026-10-26  7:18 Kaartic Sivaraam
  2026-10-26  7:18 ` [PATCH v2 1/2] unit-tests: reshuffle NOOP arguments to maintain order Kaartic Sivaraam
  2026-10-26  7:18 ` [PATCH v2 2/2] unit-tests: ignore --long-tests Kaartic Sivaraam
  0 siblings, 2 replies; 4+ messages in thread
From: Kaartic Sivaraam @ 2026-10-26  7:18 UTC (permalink / raw)
  To: Git mailing list; +Cc: Patrick Steinhardt

This is a small patch to fix a hiccup I hit while trying to run
our test using the following incantation:

  $ meson test -v --test-args='-ilx'

  ...

  Summary of Failures:

     2/1063 unit-tests                                     FAIL            0.16s   (exit status 129 or signal 1 SIGHUP)

  Ok:                 1061
  Expected Fail:      0
  Fail:               1
  Unexpected Pass:    0
  Skipped:            1
  Timeout:            0

  Full log written to /path/to/testlog.txt

On some exploration, we find the following which shows us what's wrong:

  2/1063 unit-tests RUNNING       
  >>> ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MALLOC_PERTURB_=103 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /me/git-1/build/t/unit-tests -ilx
  ――――――――――――――――――――――――――――――――――――――――――――――― ✀  ――――――――――――――――――――――――――――――――――――――――――――――――
  error: unknown switch `l'
  usage: unit-test [<options>]

      -i, --[no-]immediate  immediately exit upon the first failed test
      -r, --[no-]run suite[::test]
                            run only test suite or individual test <suite[::test]>
      --[no-]exclude <suite>
                            exclude test suite <suite>

  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
  2/1063 unit-tests FAIL            0.01s   (exit status 129 or signal 1 SIGHUP)

So, the '-l' switch that's passed to unit-tests is the problem.

On searching for how these were handled before, I stumbled across
9faf3963b6 (t: introduce compatibility options to clar-based tests,
2024-12-13) which handled this by adding such arguments as NOOP
arguments to t/unit-tests/unit-test.c. So, this patch does the same
to make unit-test ignore the '-l' passed to it.

The CI pipeline passes (for v1. v2 only had a commit message change):

 - GitHub: https://github.com/sivaraam/git/actions/runs/39756087806
   (a couple of MacOS ones didn't run owing to the lack of a runner)

- GitLab: https://gitlab.com/gitlab-org/git/-/pipelines/2975804623

---
Changes in v2:
- Fixed the s/prerequiiste/prerequisite/ typo in the commit message

- Link to v1: https://lore.kernel.org/r/20261022-ks-unit-tests-ignore-long-tests-v1-0-554a590d418b@gmail.com

Range-diff vs. v1:

1:  66759f627c = 1:  60bc3f0d83 unit-tests: reshuffle NOOP arguments to maintain order
2:  0bea06fe46 ! 2:  c39dd72a2b unit-tests: ignore --long-tests
    @@ Commit message
         So, ignore -l / --long-tests in our clar tests.

         This does not show up as a problem while running our CI as we enable
    -    the expensive prerequiiste via the GIT_TEST_LONG env variable.
    +    the expensive prerequisite via the GIT_TEST_LONG env variable.

         Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>

---
Kaartic Sivaraam (2):
      unit-tests: reshuffle NOOP arguments to maintain order
      unit-tests: ignore --long-tests

 t/unit-tests/unit-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

${range_diff}
---
base-commit: 47fdf2208c5b94c8cc01c106b8f7c85efb91c926
change-id: 20261021-ks-unit-tests-ignore-long-tests-9f32078e9100
${prerequisites}


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH v2 0/2] Make our clar tests ignore the long-tests argument
@ 2026-10-26  7:31 Kaartic Sivaraam
  2026-10-26  7:31 ` [PATCH v2 1/2] unit-tests: reshuffle NOOP arguments to maintain order Kaartic Sivaraam
  0 siblings, 1 reply; 4+ messages in thread
From: Kaartic Sivaraam @ 2026-10-26  7:31 UTC (permalink / raw)
  To: Git mailing list; +Cc: Patrick Steinhardt

(Resending in the proper thread. Still trying to figure out how to make b4 send
 v2 in the proper thread. Sorry for the noise!)

This is a small patch to fix a hiccup I hit while trying to run
our test using the following incantation:

  $ meson test -v --test-args='-ilx'

  ...

  Summary of Failures:

     2/1063 unit-tests                                     FAIL            0.16s   (exit status 129 or signal 1 SIGHUP)

  Ok:                 1061
  Expected Fail:      0
  Fail:               1
  Unexpected Pass:    0
  Skipped:            1
  Timeout:            0

  Full log written to /path/to/testlog.txt

On some exploration, we find the following which shows us what's wrong:

  2/1063 unit-tests RUNNING
  >>> ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MALLOC_PERTURB_=103 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /me/git-1/build/t/unit-tests -ilx
  ――――――――――――――――――――――――――――――――――――――――――――――― ✀  ――――――――――――――――――――――――――――――――――――――――――――――――
  error: unknown switch `l'
  usage: unit-test [<options>]

      -i, --[no-]immediate  immediately exit upon the first failed test
      -r, --[no-]run suite[::test]
                            run only test suite or individual test <suite[::test]>
      --[no-]exclude <suite>
                            exclude test suite <suite>

  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
  2/1063 unit-tests FAIL            0.01s   (exit status 129 or signal 1 SIGHUP)

So, the '-l' switch that's passed to unit-tests is the problem.

On searching for how these were handled before, I stumbled across
9faf3963b6 (t: introduce compatibility options to clar-based tests,
2024-12-13) which handled this by adding such arguments as NOOP
arguments to t/unit-tests/unit-test.c. So, this patch does the same
to make unit-test ignore the '-l' passed to it.

The CI pipeline passes (for v1. v2 only had a commit message change):

 - GitHub: https://github.com/sivaraam/git/actions/runs/39756087806
   (a couple of MacOS ones didn't run owing to the lack of a runner)

- GitLab: https://gitlab.com/gitlab-org/git/-/pipelines/2975804623

---
Changes in v2:
- Fixed the s/prerequiiste/prerequisite/ typo in the commit message

- Link to v1: https://lore.kernel.org/r/20261022-ks-unit-tests-ignore-long-tests-v1-0-554a590d418b@gmail.com

Range-diff vs. v1:

1:  66759f627c = 1:  60bc3f0d83 unit-tests: reshuffle NOOP arguments to maintain order
2:  0bea06fe46 ! 2:  c39dd72a2b unit-tests: ignore --long-tests
    @@ Commit message
         So, ignore -l / --long-tests in our clar tests.

         This does not show up as a problem while running our CI as we enable
    -    the expensive prerequiiste via the GIT_TEST_LONG env variable.
    +    the expensive prerequisite via the GIT_TEST_LONG env variable.

         Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>

---
Kaartic Sivaraam (2):
      unit-tests: reshuffle NOOP arguments to maintain order
      unit-tests: ignore --long-tests

 t/unit-tests/unit-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

---
base-commit: 47fdf2208c5b94c8cc01c106b8f7c85efb91c926
change-id: 20261021-ks-unit-tests-ignore-long-tests-9f32078e9100
-- 
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-26  7:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26  7:18 [PATCH v2 0/2] Make our clar tests ignore the long-tests argument Kaartic Sivaraam
2026-10-26  7:18 ` [PATCH v2 1/2] unit-tests: reshuffle NOOP arguments to maintain order Kaartic Sivaraam
2026-10-26  7:18 ` [PATCH v2 2/2] unit-tests: ignore --long-tests Kaartic Sivaraam
  -- strict thread matches above, loose matches on Subject: below --
2026-10-26  7:31 [PATCH v2 0/2] Make our clar tests ignore the long-tests argument Kaartic Sivaraam
2026-10-26  7:31 ` [PATCH v2 1/2] unit-tests: reshuffle NOOP arguments to maintain order Kaartic Sivaraam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox