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

Dd for tinygo #2646

Merged
merged 4 commits into from
Apr 2, 2023
Merged

Dd for tinygo #2646

merged 4 commits into from
Apr 2, 2023

Conversation

rminnich
Copy link
Member

@rminnich rminnich commented Mar 31, 2023

dd fixes for tinygo. These are pretty minimal to get it to go at all, but they have the nice side effect of removing testutil and allowing concurrency in tests.

The unit package adds a good 11K to the binary when built with tinygo. It's not entirely clear that we need what it does, but for now, it remains.

Due to some odd limitations in tinygo, the final test memory footprint had to be reduce from 1G to 1/4 G, but I doubt this changes the validity of the test.

This change will also allow dd to be built into the 'forkless' environment.

This change requires removing globals that are
written to a run() function.

This has the side effect of making parallel testing work
(probably) and removing testutil.

The code is arguably ugly, but I figure reviewers will show
better ways to do things.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
progress package now has a New(), the ProgressData is
an exported type, and the struct contains the io.Writer.

This way, we no longer gets lots of junk output during tests.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Patch coverage: 91.52% and project coverage change: -0.11 ⚠️

Comparison is base (2d775af) 75.13% compared to head (db3f04d) 75.02%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2646      +/-   ##
==========================================
- Coverage   75.13%   75.02%   -0.11%     
==========================================
  Files         411      413       +2     
  Lines       41614    41760     +146     
==========================================
+ Hits        31266    31331      +65     
- Misses      10348    10429      +81     
Impacted Files Coverage Δ
cmds/core/dd/dd.go 83.17% <89.13%> (+18.38%) ⬆️
pkg/progress/progress.go 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

This changes lets the test finish with tinycore.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
@rminnich rminnich added automerge Applying this label auto-merges the PR when ready Awaiting reviewer Waiting for a reviewer. labels Mar 31, 2023
cmds/core/dd/dd.go Outdated Show resolved Hide resolved
cmds/core/dd/dd.go Outdated Show resolved Hide resolved
cmds/core/dd/dd.go Outdated Show resolved Hide resolved
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
@binjip978 binjip978 added Awaiting author Waiting for new changes or feedback for author. and removed Awaiting reviewer Waiting for a reviewer. labels Apr 1, 2023
@rminnich rminnich merged commit 353626c into u-root:main Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Applying this label auto-merges the PR when ready Awaiting author Waiting for new changes or feedback for author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants