aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-11-06tests: wc: protect against a hang on GNU/HurdCollin Funk1-1/+2
Reported by Bruno Haible in <https://lists.gnu.org/r/coreutils/2025-11/msg00051.html>. * tests/wc/wc-total.sh: Skip a test that would exhaust memory on GNU/Hurd.
2025-09-30wc: add AVX512 function for line countingMathieu Bordere1-2/+10
* configure.ac: Add detection of AVX512 intrinsics for wc. * src/local.mk: Build AVX512 wc libraries. * src/wc.c: Add runtime detection of AVX512 intrinsics and call appropriate function when detected. * src/wc.h (wc_lines_avx512): Declare function. * tests/wc/wc-cpu.sh: Add a test that disables AVX512 intrinsics. * src/wc_avx512.c: New file containing the wc -l implementation using AVX512. The logic and code is reused from the AVX2 implementation with slight adaptations. Replaced __builtin_popcount by __builtin_popcountll and the combination of _mm256_cmpeq_epi8 and _mm256_movemask_epi8 by a single call to _mm512_cmpeq_epi8_mask. * NEWS: Mention the improvement.
2025-09-24tests: wc: fix hardware acceleration disabling testPádraig Brady1-1/+1
* tests/wc/wc-cpu.sh: The message is only printed with wc -l. Reported by Mathieu Borderé.
2025-09-14cksum,wc: support disabling hardware acceleration at runtimePádraig Brady1-0/+34
This is useful to give better test coverage at least, and may be useful for users to tune their environment. * bootstrap.conf: Reference the cpu-supports gnulib module. * src/cksum.c: Use cpu_supports() rather than __builtin_cpu_supports(). * src/wc.c: Likewise. * tests/cksum/cksum.sh: Adjust to testing all implementations. * tests/wc/wc-cpu.sh: A new test to do likewise. * tests/local.mk: Reference the new wc test.
2025-08-05maint: use consistent references to standard files in messagesCollin Funk1-2/+2
* cfg.mk (sc_standard_outputs): Add a grep command for source files. * src/du.c (main): Use standard input instead of stdin, standard output instead of stdout, and standard error instead of stderr in messages. * src/nohup.c (main): Likewise. * src/sort.c (main): Likewise. * src/split.c (main): Likewise. * src/stdbuf.c (main): Likewise. * src/wc.c (main): Likewise. * tests/du/files0-from.pl (@Tests): Adjust test case to new messages. * tests/sort/sort-files0-from.pl: Likewise. * tests/wc/wc-files0-from.pl: Likewise.
2025-01-01maint: update all copyright year number rangesPádraig Brady7-7/+7
Update to latest gnulib with new copyright year. Run "make update-copyright" and then... * gnulib: Update included in this commit as copyright years are the only change from the previous gnulib commit. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2024-02-26wc: fix -w with breaking space over UCHAR_MAXAearil1-0/+5
* src/wc.c (wc): Fix regression introduced in commit v9.4-48-gf40c6b5cf. * tests/wc/wc-nbsh.sh: Add test cases for "standard" spaces. Fixes https://bugs.gnu.org/69369
2024-01-01maint: update all copyright year number rangesPádraig Brady7-7/+7
Update to latest gnulib with new copyright year. Run "make update-copyright" and then... * gnulib: Update included in this commit as copyright years are the only change from the previous gnulib commit. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Manually update copyright year, until we fully sync with gnulib at a later stage. * tests/sample-test: Adjust to use the single most recent year.
2023-09-23wc: fix word count bugPaul Eggert1-0/+1
* bootstrap.conf (gnulib_modules): Remove c32isprint. * src/wc.c (wc): Consider all non-white-space characters to be word constituents, even if they are not printable. POSIX requires this, and it is what BSD does. Partly do this by simplifying the check for a word, by counting word starts rather than word ends. * tests/wc/wc.pl: Test for the bug.
2023-06-19tests: move tests to a directory per utilitySylvestre Ledru7-0/+417
* cfg.mk: Adjust syntax check exclusion paths. * tests/local.mk: Adjust for renamed tests.
2008-04-27move wc tests from own subdir into a single scriptJim Meyering1-68/+0
* configure.ac (AC_CONFIG_FILES): Remove wc/Makefile from the list. * tests/Makefile.am (SUBDIRS): Remove wc from the list. (TESTS): Add misc/wc. * tests/misc/wc: New file, derived from tests/wc/Tests.pm. * tests/wc/Test.pm: Remove file.
2007-08-25Remove all .cvsignore files from version control.Jim Meyering1-7/+0
2007-07-23Update all copyright notices to use the newer form.Jim Meyering1-5/+3
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering1-1/+1
2007-05-13Remove the generated tests/*/Makefile.am files from version control.Jim Meyering1-62/+0
* tests/cut/Makefile.am: git-remove this generated file. * tests/head/Makefile.am: Likewise. * tests/join/Makefile.am: Likewise. * tests/pr/Makefile.am: Likewise. * tests/sort/Makefile.am: Likewise. * tests/tac/Makefile.am: Likewise. * tests/tail/Makefile.am: Likewise. * tests/test/Makefile.am: Likewise. * tests/tr/Makefile.am: Likewise. * tests/uniq/Makefile.am: Likewise. * tests/wc/Makefile.am: Likewise. * .cvsignore, .gitignore: Ignore these generated files. * src/.cvsignore, src/.gitignore: Add chcon here, ... * .cvsignore, .gitignore: ... not here.
2007-01-13Put CU_TEST_NAME in the environment for each test run by "make check".Jim Meyering1-0/+1
* Transform all Makefile.am files so that when running "make check", CU_TEST_NAME is set to the name of the test. This is so that when I run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check" on the entire package it is more convenient to map a leak or error found in a valgrind log file back to the offending test. Use this command: (echo tests/Makefile.am.in; find tests -name Makefile.am) \ |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \ -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
2006-08-22* aclocal.m4, config.hin, configure:Paul Eggert1-5/+4
Remove from CVS, since ./bootstrap generates them automatically. * .cvsignore: Add INSTALL, Makefile.in, *.cache, *.lineno, *.log. Remove more-specific entries. This catches files like configure.lineno. * man/.cvsignore: Add Makefile.in. * src/.cvsignore: Add Makefile.in. Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c. For .cvsignore file under the tests directory: Add Makefile.in. Sort entries if necessary. Remove *.I, *.E, *.X, *.O, *-tests, build-script, mk-script if they're never created in this directory. * build-aux/.cvsignore: New file. * doc/.cvsignore: Add Makefile.in, coreutils.html, coreutils.pdf, coreutils.ps, coreutils.tps. Remove coreutils.cm (dunno what it is, but the makefile doesn't mention it). Remove coreutils.info as it is subsumed by coreutils.info*. * lib/.cvsignore: Add Makefile.in, getdate.tab.h. Remove stat.c, sysexit.h. * m4/.cvsignore: Remove Makefile, dev-ino.m4, glibc2.m4, intdiv0.m4, inttypes-h.m4, inttypes-pri.m4, jm-glibc-io.m4, lcmessage.m4, lock.m4, printf-posix.m4, same-inode.m4, size_max.m4, uintmax_t.m4, ulonglong.m4, visibility.m4, xsize.m4. Many of these are put in automatically by ../bootstrap, but that's a bootstrap bug that I plan to fix shortly. * po/.cvsignore: More ../bootstrap-related fixes, plus remove old cruft. Add *.po, LINGUAS, Makevars. Remove *.cat, *.msg, cat-id-dbl.c, messages.mo, stamp-cat-id.
2006-08-21Remove from CVS, since the bootstrap script generates them automatically.Paul Eggert1-625/+0
2006-08-19.Jim Meyering1-1/+22
2006-08-19Some of my 2006-07-03 changes to tests/*/Makefile.am were beingJim Meyering1-1/+2
backed out due to updates provoked by the copyright changes. * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that it propagates to the derived Makefile.am files. ($(srcdir)/Makefile.am): Mark generated .am files as read-only, so we don't mistakenly edit them again. * tests/cut/Makefile.am: Regenerate. * tests/head/Makefile.am: Likewise. * tests/join/Makefile.am: Likewise. * tests/pr/Makefile.am: Likewise. * tests/sort/Makefile.am: Likewise. * tests/tac/Makefile.am: Likewise. * tests/tail/Makefile.am: Likewise. * tests/test/Makefile.am: Likewise. * tests/tr/Makefile.am: Likewise. * tests/uniq/Makefile.am: Likewise. * tests/wc/Makefile.am: Likewise.
2006-08-17Add/fix copyright notices and adjust to latest GNU FDL.Paul Eggert2-1/+38
2006-08-15.Jim Meyering1-39/+46
2006-08-09Regenerate.Paul Eggert1-13/+15
2006-08-09Regenerate.Paul Eggert1-34/+36
2006-07-17Regenerate.Paul Eggert1-36/+35
2006-07-09Regenerate.Paul Eggert1-40/+62
2006-07-03* tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):Jim Meyering1-1/+1
Add $VG_PATH_PREFIX as a prefix to $PATH
2006-05-06.Jim Meyering1-2/+0
2006-03-26.Jim Meyering1-3/+4
2006-03-12.Jim Meyering1-6/+6
2006-02-20.Jim Meyering1-5/+7
2006-01-12.Jim Meyering1-5/+8
2006-01-04.Jim Meyering1-14/+14
2005-12-21.Jim Meyering1-1/+2
2005-12-17.Jim Meyering1-0/+1
2005-12-15.Jim Meyering1-3/+5
2005-12-03.Jim Meyering1-1/+0
2005-11-22.Jim Meyering1-0/+1
2005-10-23.Jim Meyering1-1/+2
2005-09-23.Jim Meyering1-5/+6
2005-09-22.Jim Meyering1-0/+8
2005-09-22Regenerate.Paul Eggert1-13/+16
2005-09-16Regenerate.Paul Eggert1-14/+7
2005-09-10.Jim Meyering1-0/+8
2005-09-09Regenerate.Paul Eggert1-8/+0
2005-09-04.Jim Meyering1-0/+8
2005-08-02.Jim Meyering1-23/+21
2005-07-12.Jim Meyering1-1/+1
2005-07-08Regenerate.Paul Eggert1-1/+1
2005-07-07.Jim Meyering1-5/+5