<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/Makefile.am, branch v8.8</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.8</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-12-16T21:55:31Z</updated>
<entry>
<title>sort: fix hang with sort --compress</title>
<updated>2010-12-16T21:55:31Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-12-16T21:55:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1b31ce6982a9151d9dfe2ea3595ad7595cb9ca86'/>
<id>urn:sha1:1b31ce6982a9151d9dfe2ea3595ad7595cb9ca86</id>
<content type='text'>
* NEWS: Document this.
* src/sort.c (UNCOMPRESSED, UNREAPED, REAPED): New constants.
(struct tempnode): New member 'state', to hold these constants.
The pid member is now undefined if state == UNCOMPRESSED.
(struct sortfile): Replace member 'pid' with member 'temp'.
(uintptr): Remove.
(proctab_hasher, proctab_comparator, register_proc, delete_proc):
Proctab entries are now struct tempnode *, not pid_t, to handle
the case where multiple tempnode objects correspond to the same
pid.  This avoids a race condition that can cause a hang.
(register_proc): Arg is now struct tempnode *, not pid_t.  All
callers changed.
(delete_proc): Set tempnode state to REAPED.
(create_temp_file): No need to set pid member here; it's now
done when the pid is known.
(maybe_create_temp, create_temp): Remove PPID arg.  Return struct
tempnode *, not char *.  All callers changed.
(maybe_create_temp): Set node state to UNCOMPRESSED or UNREAPED.
No need to set node-&gt;pid to 0.
(open_temp): Replace NAME and PID args with a single TEMP arg.
All callers changed.  Wait only for unreaped children.
(zaptemp): Wait for decompressor to finish before removing its
temporary-file input.  This avoids .nfsXXXX hassles with NFS
and fixes a race (leading to a hang) regardless of NFS.
(open_input_files): Adjust to new way of dealing with temp files
and their subprocesses.
* tests/Makefile.am (TESTS): Add misc/sort-compress-hang.
* tests/misc/sort-compress-hang: New file.
</content>
</entry>
<entry>
<title>sort: fix some --compress reaper bugs</title>
<updated>2010-12-14T07:23:47Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-12-14T07:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0da4d843003e9d38624e19c24c7fb670f1bb4749'/>
<id>urn:sha1:0da4d843003e9d38624e19c24c7fb670f1bb4749</id>
<content type='text'>
* src/sort.c (uintptr): New type.
(enum procstate, struct procnode, update_proc): Remove.
(proctab_hasher, proctab_comparator, register_proc, wait_proc):
(reap_some): The proctab is now simply a hash of process-IDs
rather than of pointers to objects with reference counts and
states; this is smaller and faster and easier to understand.
(nprocs): Now pid_t, not size_t, since one cannot have more than
PID_MAX children.
(reap): If the argument is -1, wait; if 0 (a new value), do not.
Delete pid from proctab as needed.  Ignore children that are not
in proctab, as they are from the program that exec'ed us and are
irrelevant to our success or failure.
(delete_proc, reap_all): New functions.
(open_temp): Register the child.
(sort): Clean up all children afterwards; without this patch,
'sort' sometimes missed failures in children due to race conditions.
* tests/Makefile.am (TESTS): Add misc/sort-compress-proc.
* tests/misc/sort-compress-proc: New file, to test for the
bugs fixed above.
</content>
</entry>
<entry>
<title>tests: test for access to stale thread memory</title>
<updated>2010-12-12T21:38:49Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-12-12T21:38:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b212633c41870cd4b68b8522041b51429b1ba1bd'/>
<id>urn:sha1:b212633c41870cd4b68b8522041b51429b1ba1bd</id>
<content type='text'>
* tests/misc/sort-stale-thread-mem: New tests.
* tests/Makefile.am (TESTS): Add it.
</content>
</entry>
<entry>
<title>sort: use mutexes, not spinlocks (avoid busy loop on blocked output)</title>
<updated>2010-12-11T08:29:13Z</updated>
<author>
<name>Chen Guo</name>
<email>chenguo4@ucla.edu</email>
</author>
<published>2010-12-06T08:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=621876ff446885d32922f34681790581c994f9a5'/>
<id>urn:sha1:621876ff446885d32922f34681790581c994f9a5</id>
<content type='text'>
Running a command like this on a multi-core system
  sort &lt; big-file | less
would peg all processors at near 100% utilization.
* src/sort.c: (struct merge_node) Change member lock to mutex.
All uses changed.
* tests/Makefile.am (XFAIL_TESTS): Remove definition, now that
this test passes once again.  I.e., the sort-spinlock-abuse test
no longer fails.
* NEWS (Bug reports): Mention this.
Reported by DJ Lucas in http://debbugs.gnu.org/7489.
</content>
</entry>
<entry>
<title>tests: add test for parallel sort -u segfault bug</title>
<updated>2010-12-01T07:15:42Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-11-28T11:59:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a5207bb1391cb8e169bc6036eb036bb1a89cde89'/>
<id>urn:sha1:a5207bb1391cb8e169bc6036eb036bb1a89cde89</id>
<content type='text'>
* tests/misc/sort-unique-segv: New file.
* tests/Makefile.am (TESTS): Add it.
</content>
</entry>
<entry>
<title>tests: test for parallel sort spinlock abuse</title>
<updated>2010-11-27T15:32:06Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-11-27T14:50:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=fbb47bf42457f8126cc128ff2c4590ad34d5e730'/>
<id>urn:sha1:fbb47bf42457f8126cc128ff2c4590ad34d5e730</id>
<content type='text'>
* tests/misc/sort-spinlock-abuse: New file.
* tests/Makefile.am (TESTS): Add it.
(XFAIL_TESTS): Mark this as an expected-to-fail (for now) test.
</content>
</entry>
<entry>
<title>split: add --number to generate a particular number of files</title>
<updated>2010-11-22T01:45:15Z</updated>
<author>
<name>Chen Guo</name>
<email>chen.guo.0625@gmail.com</email>
</author>
<published>2010-01-08T11:42:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=be107398e56e9f6ada8cd558b3f43bb1ed70fb84'/>
<id>urn:sha1:be107398e56e9f6ada8cd558b3f43bb1ed70fb84</id>
<content type='text'>
* src/split.c (usage, long_options, main): New options --number,
--unbuffered, --elide-empty-files.
(set_suffix_length): New function to auto increase suffix length
to handle a specified number of files.
(create): New function.  Refactored from cwrite() and ofile_open().
(bytes_split): Add max_files argument to support byte chunking.
(lines_chunk_split): New function.  Split file into chunks of lines.
(bytes_chunk_extract): New function.  Extract a chunk of file.
(of_info): New struct.  Used by functions lines_rr and ofile_open
to keep track of file descriptors associated with output files.
(ofile_open): New function.  Shuffle file descriptors when there
are more output files than available file descriptors.
(lines_rr): New function to distribute lines round-robin to files.
(chunk_parse): New function.  Parses K/N syntax.
* tests/misc/split-bchunk: New test for byte chunking.
* tests/misc/split-lchunk: New test for line delimited chunking.
* tests/misc/split-rchunk: New test for round-robin chunking.
* tests/Makefile.am: Reference new tests.
* tests/misc/split-fail: Add failure scenarios for new options.
* tests/misc/split-l: Fix a typo. s/ln/split/.
* doc/coreutils.texi (split invocation): Document --number.
* NEWS: Mention the new feature.
* .mailmap: Map new email address for shortlog.

Signed-off-by: Pádraig Brady &lt;P@draigBrady.com&gt;
</content>
</entry>
<entry>
<title>od: fix bugs in displaying floating-point values</title>
<updated>2010-11-18T17:51:04Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-11-18T17:50:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a71c22fdf0bae4a4d89327a78ab168b53a9d020f'/>
<id>urn:sha1:a71c22fdf0bae4a4d89327a78ab168b53a9d020f</id>
<content type='text'>
* NEWS: Describe patch.
* bootstrap.conf (gnulib_modules): Add ftoastr.
* src/od.c: Include ftoastr.h, not float.h.
(FLT_DIG, DBL_DIG): Remove.  No need to verify LDBL_DIG.
(FMT_BYTES_ALLOCATED): No need to worry about floating point now,
since this format is no longer used for floating point.
(PRINT_FIELDS): New macro, with most of the guts of the old PRINT_TYPE.
(PRINT_TYPE): Rewrite to use PRINT_FIELDS.
(PRINT_FLOATTYPE): New macro.  This uses the new functions from
ftoastr.
(print_float, print_double, print_long_double): Reimplement
using PRINT_FLOATTYPE.
(decode_one_format): Calculate field widths based on ftoastr-supplied
macros.
* tests/Makefile.am (TESTS): Add misc/od-float.
* tests/misc/od-float: New file.
</content>
</entry>
<entry>
<title>tests: remove test-lib.sh; now all tests use gnulib's init.sh</title>
<updated>2010-11-17T19:48:57Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-11-14T11:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=11d3389f5a11d988c8e384299a79ee2644977f97'/>
<id>urn:sha1:11d3389f5a11d988c8e384299a79ee2644977f97</id>
<content type='text'>
* tests/test-lib.sh: Remove file.  No longer used.
* tests/Makefile.am (EXTRA_DIST): Remove it here, too.
* tests/sample-test: Correct a comment.
</content>
</entry>
<entry>
<title>csplit: fix a memory leak per input buffer</title>
<updated>2010-11-11T01:40:12Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-11-10T14:35:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0339eb4598600024cedca14a7e882c1737dd2d82'/>
<id>urn:sha1:0339eb4598600024cedca14a7e882c1737dd2d82</id>
<content type='text'>
* src/csplit.c (free_buffer): Also free the line offsets buffers
(remove_line): Also free the containing structure
* tests/misc/csplit-heap: A new test to trigger with leaks of
this magnitude.
* tests/Makefile.am: Reference the new test
* NEWS: Mention the fix
Reported by David Hofstee
</content>
</entry>
</feed>
