{"thread":{"id":"66660","subject":"[PATCH v2 0/2] Make our clar tests ignore the long-tests argument","startedAt":"2026-10-26T07:18:20Z","lastAt":"2026-10-26T07:18:22Z","messageCount":3,"participants":["Kaartic Sivaraam"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"556254","messageId":"20261026-ks-unit-tests-ignore-long-tests-v2-0-eaab5657c19c@gmail.com","threadId":"66660","inReplyTo":null,"subject":"[PATCH v2 0/2] Make our clar tests ignore the long-tests argument","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2026-10-26T07:18:20Z","receivedAt":"2026-10-26T07:18:20Z","isPatch":true,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"This is a small patch to fix a hiccup I hit while trying to run\nour test using the following incantation:\n\n  $ meson test -v --test-args='-ilx'\n\n  ...\n\n  Summary of Failures:\n\n     2/1063 unit-tests                                     FAIL            0.16s   (exit status 129 or signal 1 SIGHUP)\n\n  Ok:                 1061\n  Expected Fail:      0\n  Fail:               1\n  Unexpected Pass:    0\n  Skipped:            1\n  Timeout:            0\n\n  Full log written to /path/to/testlog.txt\n\nOn some exploration, we find the following which shows us what's wrong:\n\n  2/1063 unit-tests RUNNING       \n  >>> 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\n  ――――――――――――――――――――――――――――――――――――――――――――――― ✀  ――――――――――――――――――――――――――――――――――――――――――――――――\n  error: unknown switch `l'\n  usage: unit-test [<options>]\n\n      -i, --[no-]immediate  immediately exit upon the first failed test\n      -r, --[no-]run suite[::test]\n                            run only test suite or individual test <suite[::test]>\n      --[no-]exclude <suite>\n                            exclude test suite <suite>\n\n  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\n  2/1063 unit-tests FAIL            0.01s   (exit status 129 or signal 1 SIGHUP)\n\nSo, the '-l' switch that's passed to unit-tests is the problem.\n\nOn searching for how these were handled before, I stumbled across\n9faf3963b6 (t: introduce compatibility options to clar-based tests,\n2024-12-13) which handled this by adding such arguments as NOOP\narguments to t/unit-tests/unit-test.c. So, this patch does the same\nto make unit-test ignore the '-l' passed to it.\n\nThe CI pipeline passes (for v1. v2 only had a commit message change):\n\n - GitHub: https://github.com/sivaraam/git/actions/runs/39756087806\n   (a couple of MacOS ones didn't run owing to the lack of a runner)\n\n- GitLab: https://gitlab.com/gitlab-org/git/-/pipelines/2975804623\n\n---\nChanges in v2:\n- Fixed the s/prerequiiste/prerequisite/ typo in the commit message\n\n- Link to v1: https://lore.kernel.org/r/20261022-ks-unit-tests-ignore-long-tests-v1-0-554a590d418b@gmail.com\n\nRange-diff vs. v1:\n\n1:  66759f627c = 1:  60bc3f0d83 unit-tests: reshuffle NOOP arguments to maintain order\n2:  0bea06fe46 ! 2:  c39dd72a2b unit-tests: ignore --long-tests\n    @@ Commit message\n         So, ignore -l / --long-tests in our clar tests.\n\n         This does not show up as a problem while running our CI as we enable\n    -    the expensive prerequiiste via the GIT_TEST_LONG env variable.\n    +    the expensive prerequisite via the GIT_TEST_LONG env variable.\n\n         Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>\n\n---\nKaartic Sivaraam (2):\n      unit-tests: reshuffle NOOP arguments to maintain order\n      unit-tests: ignore --long-tests\n\n t/unit-tests/unit-test.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\n${range_diff}\n---\nbase-commit: 47fdf2208c5b94c8cc01c106b8f7c85efb91c926\nchange-id: 20261021-ks-unit-tests-ignore-long-tests-9f32078e9100\n${prerequisites}\n\n\n"},{"id":"556255","messageId":"20261026-ks-unit-tests-ignore-long-tests-v2-1-eaab5657c19c@gmail.com","threadId":"66660","inReplyTo":"20261026-ks-unit-tests-ignore-long-tests-v2-0-eaab5657c19c@gmail.com","subject":"[PATCH v2 1/2] unit-tests: reshuffle NOOP arguments to maintain order","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2026-10-26T07:18:21Z","receivedAt":"2026-10-26T07:18:21Z","isPatch":true,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"Ever since 9faf3963b6 (t: introduce compatibility options to\nclar-based tests, 2024-12-13), our clar tests have a few NOOP\narguments in order to accept the same arguments that our integration\ntests accept. This makes it easy to pass in test arguments when both\nunit and integration tests are run together such as via:\n\n  $ meson test -v --test-args='-ix'\n\nOn a quick scan, the order of the NOOP arguments seem to be\nalphabetical. That is only until you notice that 'with-dashes'\nappears out of order.\n\nFix this by moving it into its appropriate place thus ensuring\nthey are in alphabetical order. This makes it easy for future\npatches to not worry about where to place a NOOP argument\nthat is not yet in the list.\n\nSigned-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>\n---\n t/unit-tests/unit-test.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/unit-tests/unit-test.c b/t/unit-tests/unit-test.c\nindex 752fb38fb3..d066c8a4c8 100644\n--- a/t/unit-tests/unit-test.c\n+++ b/t/unit-tests/unit-test.c\n@@ -33,12 +33,12 @@ int cmd_main(int argc, const char **argv)\n \t\tOPT_NOOP_ARG(0, \"root\"),\n \t\tOPT_NOOP_ARG(0, \"stress\"),\n \t\tOPT_NOOP_NOARG(0, \"tee\"),\n-\t\tOPT_NOOP_NOARG(0, \"with-dashes\"),\n \t\tOPT_NOOP_ARG(0, \"valgrind\"),\n \t\tOPT_NOOP_ARG(0, \"valgrind-only\"),\n \t\tOPT_NOOP_NOARG('v', \"verbose\"),\n \t\tOPT_NOOP_NOARG('V', \"verbose-log\"),\n \t\tOPT_NOOP_ARG(0, \"verbose-only\"),\n+\t\tOPT_NOOP_NOARG(0, \"with-dashes\"),\n \t\tOPT_NOOP_NOARG('x', NULL),\n \t\tOPT_END(),\n \t};\n\n-- \n2.56.0.99.g5a7d1e8045.dirty\n\n\n"},{"id":"556256","messageId":"20261026-ks-unit-tests-ignore-long-tests-v2-2-eaab5657c19c@gmail.com","threadId":"66660","inReplyTo":"20261026-ks-unit-tests-ignore-long-tests-v2-0-eaab5657c19c@gmail.com","subject":"[PATCH v2 2/2] unit-tests: ignore --long-tests","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2026-10-26T07:18:22Z","receivedAt":"2026-10-26T07:18:22Z","isPatch":true,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"In the same spirit as 9faf3963b6 (t: introduce compatibility options to\nclar-based tests, 2024-12-13), we should ignore -l / --long-tests passed\nto our clar tests. It may be passed along while manually running tests\nvia a command as follows:\n\n  $ meson test -v --test-args='-ilx'\n\nSo, ignore -l / --long-tests in our clar tests.\n\nThis does not show up as a problem while running our CI as we enable\nthe expensive prerequisite via the GIT_TEST_LONG env variable.\n\nSigned-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>\n---\n t/unit-tests/unit-test.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/unit-tests/unit-test.c b/t/unit-tests/unit-test.c\nindex d066c8a4c8..06ffd0f5bb 100644\n--- a/t/unit-tests/unit-test.c\n+++ b/t/unit-tests/unit-test.c\n@@ -28,6 +28,7 @@ int cmd_main(int argc, const char **argv)\n \t\t */\n \t\tOPT_NOOP_NOARG('d', \"debug\"),\n \t\tOPT_NOOP_NOARG(0, \"github-workflow-markup\"),\n+\t\tOPT_NOOP_NOARG('l', \"long-tests\"),\n \t\tOPT_NOOP_NOARG(0, \"no-bin-wrappers\"),\n \t\tOPT_NOOP_ARG(0, \"no-chain-lint\"),\n \t\tOPT_NOOP_ARG(0, \"root\"),\n\n-- \n2.56.0.99.g5a7d1e8045.dirty\n\n\n"}]}