You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well... This is embarrassing. @DoBi could you tell me:
The output of uname -a
Which kind of file config.log is. Is it regular? A symlink?
The tests in #2001 find this regression; that's why they fail. The weird thing is however that manually calling cat never fails for me, it only ever fails through cargo test. I will investigate further.
It seems that any file of length <= 16384 fails to print anything. That's the buffer size I used for the splice operation. I have an idea of what is wrong.
Activity
sylvestre commentedon Apr 3, 2021
Yeah, I noticed that too :(
I will do a 0.0.6 to fix it.
I guess it is caused by
#1978
cc @ArniDagur
We should improve the coverage:
https://codecov.io/gh/uutils/coreutils/src/master/src/uu/cat/src/cat.rs
sylvestre commentedon Apr 3, 2021
I yanked 0.0.5 from crates.io because of this
Merge pull request #2018 from sylvestre/revert-cat
ArniDagur commentedon Apr 3, 2021
Well... This is embarrassing. @DoBi could you tell me:
uname -aconfig.logis. Is it regular? A symlink?The tests in #2001 find this regression; that's why they fail. The weird thing is however that manually calling
catnever fails for me, it only ever fails throughcargo test. I will investigate further.sylvestre commentedon Apr 3, 2021
on a regular debian:
ArniDagur commentedon Apr 3, 2021
It seems that any file of length
<= 16384fails to print anything. That's the buffer size I used for the splice operation. I have an idea of what is wrong.tertsdiepraam commentedon Apr 3, 2021
@ArniDagur those tests match what's happening on my machine. It only seems to fail without options. Hope that helps!
ArniDagur commentedon Apr 3, 2021
wow I'm so dumb.
I'll post a fix in a minute.
DoBi commentedon Apr 3, 2021
@ArniDagur in case you need some more info for
cat: error: EINVAL: Invalid argument:Output of
uname -a:Linux XXX 5.11.10-hardened1-1-hardened #1 SMP PREEMPT Thu, 25 Mar 2021 21:32:46 +0000 x86_64 unknown unknown GNU/LinuxIt is a regular file. Output of
ls -las config.log40 -rw-r--r-- 1 <username> <groupname> 38586 3. Apr 17:02 config.logThe same error appears when executing the command on a symlink to this file.
ArniDagur commentedon Apr 3, 2021
One line fix:
ArniDagur commentedon Apr 3, 2021
@DoBi Could you try #2020 and see if that fixes the EINVAL error?
sylvestre commentedon Apr 3, 2021
Thanks :)
by the way, if you want to benchmark it, hyperfine is pretty good
https://github.com/sharkdp/hyperfine
DoBi commentedon Apr 3, 2021
Yes, it works fine with both, the regular file as well as with the symlink 👍
sylvestre commentedon Apr 3, 2021
This issue is now fixed in tree. So, closing :)