coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

dd: interpret Stdin as File to seek it

Open ArtemSkrebkov opened this issue 3 years ago • 7 comments

It fixes a test including dd from tests/misc/head-c.sh. Corresponding issue: https://github.com/uutils/coreutils/issues/3008#

I expected that tests/dd/not-rewound.sh would also be fixed, but unfortunately, it is not the case. It seems that https://github.com/uutils/coreutils/issues/3626 is still relevant.

Background

An attempt to skip bytes by read_skip leads to consuming all stdin by a rust application. Another approach to tackle this is to interpret stdin as File. More details in https://github.com/uutils/coreutils/issues/3008#issuecomment-1136024931

ArtemSkrebkov avatar Jun 22 '22 11:06 ArtemSkrebkov

Could you please add a test? We have plenty of tests in tests/by-util/test_*

sylvestre avatar Jun 22 '22 12:06 sylvestre

Could you please fix that issue? thanks


error[E0425]: cannot find value `i` in this scope
  --> src\uu\dd\src/dd.rs:93:12
   |
93 |         Ok(i)
   |            ^ not found in this scope

sylvestre avatar Jun 23 '22 22:06 sylvestre

Could you please fix that issue? thanks


error[E0425]: cannot find value `i` in this scope
  --> src\uu\dd\src/dd.rs:93:12
   |
93 |         Ok(i)
   |            ^ not found in this scope

Fixed.

ArtemSkrebkov avatar Jun 24 '22 11:06 ArtemSkrebkov

a bunch of tests are broken, could you please have a look? thanks

sylvestre avatar Jun 25 '22 20:06 sylvestre

Yeah. Right. I described why the tests fail in the previous comment. I will try to debug it more, but if there is someone, who is more proficient in the project, I can chat with, that would probably help to fix the issue faster.

ArtemSkrebkov avatar Jun 26 '22 21:06 ArtemSkrebkov

@ArtemSkrebkov ping?

sylvestre avatar Aug 23 '22 09:08 sylvestre

No luck since the last debugging attempt. I believe, we probably can close until better times.

ArtemSkrebkov avatar Aug 23 '22 14:08 ArtemSkrebkov

Closing until better times :)

tertsdiepraam avatar Sep 28 '22 17:09 tertsdiepraam