Skip to content

Conversation

@FidelSch
Copy link
Contributor

Adresses #9333

@sylvestre
Copy link
Contributor

Lgtm (waiting for the ci now)

Comment on lines 945 to 951
let result = scene.ucmd().args(&["dir", "dir_link"]).fails();

assert!(
result
.stderr_str()
.contains("hard link not allowed for directory")
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A detail: you can simplify the code a bit by using stderr_contains:

Suggested change
let result = scene.ucmd().args(&["dir", "dir_link"]).fails();
assert!(
result
.stderr_str()
.contains("hard link not allowed for directory")
);
scene
.ucmd()
.args(&["dir", "dir_link"])
.fails()
.stderr_contains("hard link not allowed for directory");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totally missed that, adding it now

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/ln/hard-to-sym. tests/ln/hard-to-sym is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)

1 similar comment
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/ln/hard-to-sym. tests/ln/hard-to-sym is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/ln/hard-to-sym. tests/ln/hard-to-sym is passing on 'main'. Maybe you have to rebase?

@FidelSch
Copy link
Contributor Author

GNU tests seem to not pass still, even though I am mimicking the behaviour of my builtin ln.
Tests seem to expect a different error message. Maybe from a different coreutils version?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/ln/hard-to-sym. tests/ln/hard-to-sym is passing on 'main'. Maybe you have to rebase?

@cakebaker
Copy link
Contributor

@FidelSch we replace the error message used in the GNU test in util/build-gnu.sh

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/fold/fold is no longer failing!

@cakebaker cakebaker merged commit b5561e7 into uutils:main Nov 21, 2025
130 checks passed
@cakebaker
Copy link
Contributor

Thanks for your PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ln's error message is less useful than GNU ln's when trying to create a hardlink to a directory

3 participants