Skip to content

cmds/core/cp: make it standalone#3566

Open
binjip978 wants to merge 2 commits intomainfrom
cp
Open

cmds/core/cp: make it standalone#3566
binjip978 wants to merge 2 commits intomainfrom
cp

Conversation

@binjip978
Copy link
Copy Markdown
Contributor

No description provided.

@binjip978 binjip978 requested a review from rminnich April 5, 2026 04:17
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 5, 2026

Codecov Report

❌ Patch coverage is 69.06475% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.62%. Comparing base (b990cfe) to head (d4625f7).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3566      +/-   ##
==========================================
+ Coverage   60.51%   60.62%   +0.11%     
==========================================
  Files         652      653       +1     
  Lines       45340    45574     +234     
==========================================
+ Hits        27439    27631     +192     
- Misses      17901    17943      +42     
Flag Coverage Δ
.-amd64 90.90% <ø> (ø)
cmds/...-amd64 52.18% <86.41%> (+0.39%) ⬆️
integration/generic-tests/...-amd64 30.67% <0.00%> (+0.23%) ⬆️
integration/generic-tests/...-arm 33.35% <0.00%> (+0.37%) ⬆️
integration/generic-tests/...-arm64 29.87% <0.00%> (+0.24%) ⬆️
integration/gotests/...-amd64 60.22% <86.41%> (+0.20%) ⬆️
integration/gotests/...-arm 60.82% <86.41%> (+0.10%) ⬆️
integration/gotests/...-arm64 60.96% <86.41%> (+0.20%) ⬆️
pkg/...-amd64 58.36% <44.82%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
everything 65.47% <69.06%> (+0.10%) ⬆️
cmds/exp 34.18% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Siarhiej Siemianczuk <[email protected]>
Comment thread cmds/core/cp/cp_test.go Outdated
in := bufio.NewReader(&inBuf)
f := setupPreCallback(tt.recursive, tt.ask, tt.force, &out, *in)
srcfi, err := os.Stat(tt.args[0])
// If the src file does not exist, there is no point in continue, but it is not an error so the say.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I do not understand this comment. It may have been in the original but this may be a good time to fix it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't understand it either, no sure what is even need to be fixed here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

there's another problem here now. tt.args[0] is "cp", not the source file. I think this should be args[1]?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it calls run directly, in run we have this where cp is skipped:

fs.Parse(unixflag.ArgsToGoArgs(args[1:]))

So cp as first argument is ok for this test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I did some cleaning, and removed some "tests" that don't really test anything. But I think cp need more work, but let's do it later.

@rminnich rminnich added the Awaiting author Waiting for new changes or feedback for author. label Apr 5, 2026
remove broken tests, they send "cp" as a first argument and
always return an cp.ErrSkip or nil

Signed-off-by: Siarhiej Siemianczuk <[email protected]>
@binjip978 binjip978 added Awaiting reviewer Waiting for a reviewer. and removed Awaiting author Waiting for new changes or feedback for author. labels Apr 6, 2026
@binjip978 binjip978 requested a review from rminnich April 13, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting reviewer Waiting for a reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants