Commit graph

83 commits

Author SHA1 Message Date
Sylvestre Ledru
f50cde252b only set SELINUX_ENABLED=1 on Linux 2023-07-24 21:30:23 +02:00
Joseph Jon Booker
9bf1fb5838 util/build-gnu.sh reword error w/o gnu coreutils
For a new contributor, the message given by `utils/build-gnu.sh` is
fairly confusing - it starts with several lines of noise (showing
variables that are set in the script) followed by an error about missing
"GNU" and a `git` command string.

This commit changes the script to explicitly instruct the user to run
the `git clone` command. Since the GNU coreutils repository is probably
missing for new developers, this error is shown if the repository is
missing without including VARIABLE=value lines that are not actionable
yet.
2023-06-29 10:50:15 +02:00
Sylvestre Ledru
01af46e914
Use misc instead of test
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-06-20 15:45:55 +02:00
Sylvestre Ledru
e70d7d3b90 Hack the tests/help/help-version-getopt.sh tests:
* "hostid BEFORE --help" doesn't fail for GNU. we fail. we are probably doing better
* "hostid BEFORE --help AFTER " same for this
2023-06-19 22:32:49 +02:00
Sylvestre Ledru
0e95ce571f gnu: adjust tests/rm/inaccessible.sh error message 2023-05-01 08:40:07 +02:00
Sylvestre Ledru
c5fb6eac9f
Merge pull request #4794 from shinhs0506/mv-target-dir
mv: check if --target is a directory
2023-04-29 10:40:44 +02:00
Sylvestre Ledru
5a77608ef9
move the declaration on a single line 2023-04-29 09:48:05 +02:00
John Shin
ee3da4284c mv: update gnu error message to match the one generated by clap 2023-04-28 18:39:41 -07:00
Daniel Hofstetter
9b67ad05b8 build-gnu.sh: always update PATH in Makefile 2023-04-26 17:07:18 +02:00
Sylvestre Ledru
afa5c15581 gnu test: don't sync the po files
We aren't testing the locale yet.
2023-04-24 12:03:21 +02:00
Daniel Hofstetter
40fef49817 Fix incorrect comment & remove irrelevant comment 2023-04-13 16:47:05 +02:00
Sylvestre Ledru
f7ff0d45b8 du: Update the GNU error message to our for tests/du/threshold.sh
We are doing a better job.
Make it FAIL => PASS
2023-03-27 22:10:07 +02:00
Jeffrey Finkelstein
a396ebd883 touch: add support for some relative times
For example,

    $ touch -d +1 days

Fixes #3964.
2022-11-29 22:53:13 +01:00
Daniel Hofstetter
4fdfedf61e build-gnu: fix test for numfmt 2022-11-02 10:20:04 +01:00
Terts Diepraam
9e1902eae3 build-gnu: fix test for basenc 2022-10-13 23:04:58 +02:00
Sylvestre Ledru
2e26e1d2bd chroot: implement --skip-chdir 2022-09-21 19:46:58 +02:00
Jan Scheer
5258dec9a8
tail: fix race condition (#3798)
* tail: fix race condition (fix #3765)

There exists a race condition (RC) that can occur if changes to a path
happen after the initial print loop in `uu_tail()`, but before the
path is added to the notify-Watcher thread in `follow()`.

To minimize the window where the RC can occur, this moves starting the
Watcher thread and adding paths to it from `follow()` to the initial
print loop in `uu_tail()`.

Additionally, to make sure the RC cannot happen in
"gnu/tests/tail-2/F-headers.sh", the error message that is used as a trigger
in this test, is delayed until the path is added to the Watcher thread.

* build-gnu: remove workarounds for tail

Remove workarounds for "tests/tail-2/F-headers.sh" which are
(presumably) no longer needed because of the race condition fix.

* build-gnu: remove workarounds for tail

Remove workarounds for "tests/tail-2/F-headers.sh" which are
(presumably) no longer needed because of the race condition fix.

* tail: refactor to minimize chances of RC

Move "adding paths to Watcher thread" to its own loop and run this loop
before the initial tail-print-loop in order to minimize the window for
race conditions.
2022-08-14 01:01:15 +02:00
Niyaz Nigmatullin
5978185f94 fix spelling 2022-08-09 08:35:10 +03:00
Niyaz Nigmatullin
dbaff49de6 gnu-tests: disable some tests that implementation-specific 2022-08-09 08:35:10 +03:00
Jan Scheer
39505e39ed
build-gnu: attempt to fix #3765 2022-08-05 07:33:36 +02:00
Niyaz Nigmatullin
85021041b4 F-headers: try make 409 seconds timeout 2022-08-02 15:38:25 +03:00
Niyaz Nigmatullin
20a103f9c7 gnu-tests/F-headers: increase number of attempts 2022-08-02 15:38:25 +03:00
Niyaz Nigmatullin
e5fc8bca8d basenc: fix error code on on wrong arguments, fix usage printing test 2022-07-25 23:12:10 +03:00
Niyaz Nigmatullin
f220c86121 util/build-gnu.sh: remove some test changes + change some messages 2022-07-19 17:34:52 +03:00
Jan Scheer
75edeea5e4
tail: reduce CPU load for polling (#3618)
* tail: reduce CPU load for polling

This reduces the CPU load for polling drastically (from ~80% down to ~5%)
by removing/fixing several previous workarounds related to polling,
while still passing all related GNU test-suite checks.
* set Notify::PollWatcher delay to: sleep_sec/10 instead of
  sleep_sec/100
* set recv_timeout to sleep_sec instead of sleep_sec/100
* remove the manual polling of watched files

Bugs:
* fix an issue with headers to consistently pass
"test_follow_name_retry_headers" and "gnu/tests/tail-2/overlay-headers.sh"

Code clean-up and refactor
* make fields of struct FileHandling private (and add getters/setters)
to ensure that the paths are absolute and match the paths returned by
Notify::Events
* replace calls to "crash!" with "return USimpleError"
* clean-up formatting
2022-06-21 22:21:19 +02:00
Terts Diepraam
e3f14ea6e5
Merge pull request #3651 from sylvestre/gnu-install
install: verbose messages shows ginstall as command
2022-06-19 12:08:53 +02:00
Sylvestre Ledru
43ce927bdb install: verbose messages shows ginstall as command 2022-06-18 22:37:09 +02:00
Sylvestre Ledru
aacf4a7dbe
sleep: Remove an incorrect comment 2022-06-18 12:22:39 +02:00
Sylvestre Ledru
0be1b7c76a
Fix typo 2022-06-15 14:33:19 +02:00
Sylvestre Ledru
1747b20cf0 sleep: return 1 is no arg + customize one of the tests (tests/misc/sleep.sh) 2022-06-15 08:57:30 +02:00
Sylvestre Ledru
b9d3841019 build gnu: continue the customization of the tests 2022-06-13 22:43:55 +02:00
Jan Scheer
8ee806a444
Merge branch 'main' into tail_notify 2022-06-02 16:31:25 +02:00
Sylvestre Ledru
06c2aea1b4 ln: Implement -L -P to make tests/ln/hard-to-sym.sh work 2022-06-01 23:03:50 +02:00
Jan Scheer
409878e323
Merge branch 'main' into tail_notify 2022-05-16 22:45:52 +02:00
Jan Scheer
5004d4b458
build-gnu: replace timeout for tests/tail/follow-stdin.sh
* `tests/tail-2/follow-stdin.sh` will hang undefinedly if uu_timeout
is used
2022-05-16 21:09:51 +02:00
Sylvestre Ledru
087d4b14fc Do not use the Rust/touch for tests/ls/abmon-align.sh 2022-05-08 21:27:08 +02:00
Sylvestre Ledru
0314f3ed8e GNU testsuite: no need to rerun the GNU build
At least, two use cases:
* when hacking on test update
* when we want to rebuild only Rust coreutils with the right option

Indeed, the GNU code should not cache often in this case
2022-05-01 19:04:52 +02:00
ndd7xv
88752ecc3e fix -h and --help discrepancies
addresses https://github.com/uutils/coreutils/issues/3370
2022-04-27 23:16:36 -04:00
gmnsii
c2e214bd99
Add dir and vdir utils (based on ls)
Fix issue #3163

They are basically ls with some different options.
2022-04-15 17:30:40 +02:00
Sylvestre Ledru
757b161164 match more the GNU behavior on error code 2022-04-06 13:59:44 +02:00
Sylvestre Ledru
97c6f6ac49 Update of the build-gnu tool to fix usage_vs_getopt.sh 2022-04-06 09:35:12 +02:00
Sylvestre Ledru
b3d87b088d ln: adjust the error messages 2022-04-01 09:25:35 +02:00
Roy Ivy III
baaa1639e1 fix/CICD ~ (GnuTests) disable factor tests 2022-03-31 23:31:48 +02:00
Roy Ivy III
a46521bb8f fix/CICD ~ (GnuTests) polish and revise factor test mutator 2022-03-31 23:31:41 +02:00
Terts Diepraam
65c3ab6afd
Merge pull request #3334 from sylvestre/gnu-selinux
when building for the GNU testsuite, force the build of selinux binaries
2022-03-31 00:11:17 +02:00
Sylvestre Ledru
050b5b0c9b ln: make the tests/ln/hard-backup.sh test work
We haven't a great error message with hard link on the same file

+ Update the GNU error message to match ours
2022-03-30 20:00:11 +02:00
Sylvestre Ledru
12c38f6eb4 when building for the GNU testsuite, force the build of selinux binaries 2022-03-30 09:31:27 +02:00
Sylvestre Ledru
a13f0c8fe0 gnu/usage_vs_getopts.sh: default the usage error value to 2 in the GNU test
Closes issue #3331
2022-03-29 22:33:18 +02:00
Sylvestre Ledru
981a77d0cd gnu/usage_vs_getopts.sh: make the test FAIL instead of ERROR 2022-03-29 22:33:18 +02:00
Jeffrey Finkelstein
5f8567695c util: use uutils timeout in GNU tests
Remove the substitution of uutils `timeout` with GNU `timeout` before
running the GNU test suite. Some of these replacements were not
actually operational because the regex was not appropriate (for
example, the test file had `timeout 10` but the regex would only match
`timeout [0-9]`). Others no longer need to be used because the uutils
version of `timeout` works well enough now to terminate a process
within the given period of time.
2022-03-26 19:35:19 +01:00