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

Re: [PATCH v2 0/3] mergesort: move tests to Clar and retire the helper

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 9, 2026, 11:52 UTC
Message-ID
<asjVkwUYJI6wERWf@pks.im>
In-Reply-To
<cover.1791365181.git.dilsheddilu123@gmail.com>
Hi,
On Wed, Oct 07, 2026 at 07:20:22PM +0530, Muhammed Dilshad A wrote:
Show 5 quoted lines
> Hi Patrick,
> 
> Thanks for the review. I followed up on the larger cleanup you mentioned.
> The sorting tests now run in Clar, and I have removed the old benchmark
> and its helper. This also removes the unused generate subcommand.

please reply to reviews individually instead of replying in the cover letter.

> The new suite keeps all 1,680 cases from the old certification test and
> adds checks for empty and small lists using both sort macros. It checks
> sorting order, stability and list length. Cleanup frees the backing
> arrays directly, so a failed assertion does not need to walk list links.

It would have made it easier to review if the new tests were added in a separate commit.

Show 10 quoted lines
> Changes since v1:
> 
> * Patch 1 is unchanged.
> * Patch 2 moves the tests to Clar and removes the unused generate and
>   test commands. The sort command remains available for the benchmark.
> * Patch 3 removes p0071 and the remaining sort helper, along with their
>   build and command registrations.
> 
> I kept the leak fix first so it can still be applied on its own if you
> would prefer to keep the broader cleanup for a separate series.

I dunno, I feel like that's not quite useful. If we didn't want to take the broader cleanup we'd instead apply v1 of your seires. In this version of the patch series it's plain unnecessary churn because we remove the code anyway.

> The Make and Meson unit tests pass, and the mergesort unit suite also
> passes with LeakSanitizer enabled. The production sorting implementation
> is unchanged.

This information is quite curious, as it makes me wonder why it is even noteworthy to point out. My basic assumption is that folks who send a series to the mailing list test their stuff, so there is no need to explicitly say so.

I mean I of course know why this is here: it's the typical "let's check all the boxes" output that AI is so happy to generate. *sigh*

Patrick
Previous: Muhammed Dilshad ANext: Muhammed Dilshad A
Message 10 of 16 in “test-mergesort: plug memory leaks in sort_stdin()”
  1. test-mergesort: plug memory leaks in sort_stdin()Muhammed Dilshad A, Oct 7, 2026
  2. Patrick SteinhardtOct 7, 2026
  3. Junio C HamanoOct 7, 2026
  4. 0/3 mergesort: move tests to Clar and retire the helperMuhammed Dilshad A, Oct 7, 2026
  5. 1/3 test-mergesort: plug memory leaks in sort_stdin()Muhammed Dilshad A, Oct 7, 2026
  6. 2/3 mergesort: move sorting tests to the unit-test frameworkMuhammed Dilshad A, Oct 7, 2026
  7. Patrick SteinhardtOct 9, 2026
  8. Muhammed Dilshad AOct 9, 2026
  9. 3/3 t: retire the sorting benchmark and mergesort helperMuhammed Dilshad A, Oct 7, 2026
  10. Patrick SteinhardtOct 9, 2026
  11. Muhammed Dilshad AOct 9, 2026
  12. 0/4 mergesort: move tests to Clar and remove the helperMuhammed Dilshad A, Oct 9, 2026
  13. 1/4 mergesort: move sorting tests to ClarMuhammed Dilshad A, Oct 9, 2026
  14. 2/4 mergesort: simplify the unit testsMuhammed Dilshad A, Oct 9, 2026
  15. 3/4 mergesort: cover empty and small listsMuhammed Dilshad A, Oct 9, 2026
  16. 4/4 t: retire the sorting benchmark and mergesort helperMuhammed Dilshad A, Oct 9, 2026

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.