<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/sort, branch master</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=master</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2026-05-04T22:38:51Z</updated>
<entry>
<title>tests: fix false failure with spaces in hierarchy</title>
<updated>2026-05-04T22:38:51Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2026-05-04T22:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dce828c3d653761daa5f5508369f9ed41436b453'/>
<id>urn:sha1:dce828c3d653761daa5f5508369f9ed41436b453</id>
<content type='text'>
* tests/sort/sort-buffer-size.sh: Use `pwd` rather than $PWD,
and quote appropriately.
Reported by Bruno Haible.
</content>
</entry>
<entry>
<title>sort: use more dynamic memory allocation with pipes</title>
<updated>2026-04-29T12:16:21Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2026-04-27T14:48:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=38cf97c1ff81895ca3c2b20ede817380e7004dcf'/>
<id>urn:sha1:38cf97c1ff81895ca3c2b20ede817380e7004dcf</id>
<content type='text'>
The default memory allocation with pipes was too passive/static,
resulting in not allocating enough memory to enable threading.
By dynamically reallocating the buffer when reading from
unknown sized inputs we better use available memory and threads.

  $ time seq 10000000 -1 0 | sort-old &gt;/dev/null
  real	0m16.523s
  user	0m16.900s
  sys	0m0.167s

  $ time seq 10000000 -1 0 | sort-old -S1G &gt;/dev/null
  real	0m12.263s
  user	0m29.646s
  sys	0m0.527s

  $ time seq 10000000 -1 0 | sort-new &gt;/dev/null
  real	0m12.994s
  user	0m31.266s
  sys	0m0.716s

It also avoids the overhead of writing to temp files
for modestly sized inputs. For example the following
input would induce interaction with temp storage:

  $ seq 125000 | wc -c
  763895

* src/sort.c (sort_buffer_size): Rename to ...
(sort_buffer_policy): ... here, and adjust to set
an initial size and limit, rather than just a size.
(fillbuf): Add a POLICY parameter, and use that
to call maybe_growbuf() as needed.
(maybe_growbuf): Return true if POLICY dictates we
should grow the buffer, and try_growbuf() was
able to reallocate the larger buffer.
* tests/sort/sort-buffer-size.sh: Add a new test.
* tests/local.mk: Reference new test.
* NEWS: Mention the improvement.
Related to https://bugs.gnu.org/10877
</content>
</entry>
<entry>
<title>tests: sort: ensure --batch-size=(rlimit+1) fails</title>
<updated>2026-02-12T17:27:49Z</updated>
<author>
<name>oech3</name>
<email>79379754+oech3@users.noreply.github.com</email>
</author>
<published>2026-02-01T13:46:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f638c29df65270401e7edf8e1f7a66e8b482a2a8'/>
<id>urn:sha1:f638c29df65270401e7edf8e1f7a66e8b482a2a8</id>
<content type='text'>
* tests/sort/sort-merge-fdlimit.sh: Add test case.
https://github.com/coreutils/coreutils/pull/182
</content>
</entry>
<entry>
<title>tests: avoid failures if 'ulimit -n' cannot set file descriptor limits</title>
<updated>2026-01-24T19:20:56Z</updated>
<author>
<name>Collin Funk</name>
<email>collin.funk1@gmail.com</email>
</author>
<published>2026-01-24T19:15:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ec77664a31c474319e4987f1194b009769410477'/>
<id>urn:sha1:ec77664a31c474319e4987f1194b009769410477</id>
<content type='text'>
This fixes test failures seen on Haiku.

* tests/ls/recursive.sh: Run 'ls' even if ulimit fails.
* tests/split/r-chunk.sh: Run 'split' even if ulimit fails.
* tests/sort/sort-merge-fdlimit.sh: Skip test if 'ulimit -n' cannot set
file descriptor limits.
Reported by Bruno Haible.
</content>
</entry>
<entry>
<title>maint: run 'make update-copyright'</title>
<updated>2026-01-01T18:56:16Z</updated>
<author>
<name>Collin Funk</name>
<email>collin.funk1@gmail.com</email>
</author>
<published>2026-01-01T18:56:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=73d3a49f45770c45808e4fdab35ae4fe248a3cd9'/>
<id>urn:sha1:73d3a49f45770c45808e4fdab35ae4fe248a3cd9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: fix recent portability issue with printf</title>
<updated>2025-12-11T22:02:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-12-11T22:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=06ed0625bd856877f9799ed92ae48d97b5e2af11'/>
<id>urn:sha1:06ed0625bd856877f9799ed92ae48d97b5e2af11</id>
<content type='text'>
* tests/sort/sort-locale.sh: Avoid non portable printf \u....
* cfg.mk (sc_env_printf): Add a new syntax check to flag future cases.
</content>
</entry>
<entry>
<title>tests: fix non-portable use of printf '\x..'</title>
<updated>2025-12-08T22:32:48Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-12-08T22:32:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2692d599ec46696dcd69458abb75c9c6a9dd0221'/>
<id>urn:sha1:2692d599ec46696dcd69458abb75c9c6a9dd0221</id>
<content type='text'>
* tests/dd/conv-case.sh: Use octal instead.
* tests/ls/hyperlink.sh: Likewise.
* tests/sort/sort-locale.sh: Likewise.
</content>
</entry>
<entry>
<title>test: re-enable tests that had a false requirement on coreutils' kill</title>
<updated>2025-11-29T12:17:27Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-11-28T17:39:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=faa566372d54f12bc4d89b367e386fc38bf127cd'/>
<id>urn:sha1:faa566372d54f12bc4d89b367e386fc38bf127cd</id>
<content type='text'>
Recently we've not built our kill command by default,
so reduce test dependence on that.

* tests/sort/sort-compress-proc.sh: `kill -l [exit_status]` is well
supported, and is a POSIX requirement.
* tests/timeout/timeout.sh: There were actually no kill invocations
in this test at all.
</content>
</entry>
<entry>
<title>tests: add tests for locale ordering</title>
<updated>2025-11-11T14:29:36Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-11-07T20:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d6fc91f37a033b1cf6325dc6b047f2a633bc16f7'/>
<id>urn:sha1:d6fc91f37a033b1cf6325dc6b047f2a633bc16f7</id>
<content type='text'>
* tests/sort/sort-locale.sh: Check sort,ls have the same (non C) order.
* tests/local.mk: Reference the new test.
</content>
</entry>
<entry>
<title>sort: fix silent exit upon SIGPIPE from --compress-program</title>
<updated>2025-10-29T19:03:23Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-10-28T19:30:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b294aff3fe6c8ebeda02b8c77877ba618474de41'/>
<id>urn:sha1:b294aff3fe6c8ebeda02b8c77877ba618474de41</id>
<content type='text'>
* src/sort.c (main): Ignore SIGPIPE so we've more control over
how we handle for stdout and compression programs.
(sort_die): Handle EPIPE from stdout and mimic a standard SIGPIPE,
otherwise reverting to a standard exit(SORT_FAILURE);
* tests/sort/sort-compress-proc.sh: Add a test case.
* NEWS: Mention the bug fix.
</content>
</entry>
</feed>
