Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all uses of crash! #5487

Open
tertsdiepraam opened this issue Nov 2, 2023 · 6 comments
Open

Remove all uses of crash! #5487

tertsdiepraam opened this issue Nov 2, 2023 · 6 comments
Labels

Comments

@tertsdiepraam
Copy link
Member

The crash! macro is a leftover from old error handling in this project. We should always use UError and show! now.

Here are all uses of crash!: https:/search?q=repo%3Auutils%2Fcoreutils%20crash!&type=code

We can tackle each of these in separate PRs. Make sure not to link those PRs to this issue (so don't write "closes #XXXX"), because that might close it prematurely. Only I've started here: https:/search?q=repo%3Auutils%2Fcoreutils%20crash!&type=code

This is a good first issue if you're looking for one!

@tertsdiepraam
Copy link
Member Author

Awesome work here everyone! Just a couple of uses left!

@allaboutevemirolive
Copy link
Contributor

I tried to run the cargo test and got the result below. Is the output intended like this?

failures:

---- test_du::test_du_no_dereference stdout ----
mkdir: /tmp/.tmpaRZr6V/a_dir
symlink: /tmp/.tmpaRZr6V/a_dir,/tmp/.tmpaRZr6V/symlink
run: /home/nemesis/Documents/Github/Focus/util/coreutils_master/target/debug/coreutils du -P
run: /home/nemesis/Documents/Github/Focus/util/coreutils_master/target/debug/coreutils du --dereference -P
run: /home/nemesis/Documents/Github/Focus/util/coreutils_master/target/debug/coreutils du -P --dereference
thread 'test_du::test_du_no_dereference' panicked at tests/by-util/test_du.rs:372:14:
'4	./a_dir
8	./subdir/deeper/deeper_dir
16	./subdir/deeper
16	./subdir/links
36	./subdir
48	.
' does not contain 'symlink'


failures:
    test_du::test_du_no_dereference

test result: FAILED. 2540 passed; 1 failed; 28 ignored; 0 measured; 0 filtered out; finished in 60.97s

error: test failed, to rerun pass `--test tests`

@cakebaker
Copy link
Contributor

@allaboutevemirolive I get the same error on my local machine whereas it works fine in the CI. On my machine it is because /tmp is using tmpfs and there du --dereference doesn't work with both GNU du and uutils du.

@tertsdiepraam
Copy link
Member Author

Should we make a separate issue for that? It seems unrelated to this one

@allaboutevemirolive
Copy link
Contributor

What concerns me is; why this error did not trigger repo CI? @tertsdiepraam

@tertsdiepraam
Copy link
Member Author

I'd love to discuss that in another issue :)

(It's probably like @cakebaker said because of the filesystem in the CI being different)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants