Skip to content

Conversation

@zulinx86
Copy link
Contributor

@zulinx86 zulinx86 commented Jul 18, 2024

Follow up of PR #4689.

Changes

run_shell_command() is no longer used and related error variant and tests can be dropped.

Reason

$ tools/devtool build --release
[Firecracker release.sh 2024-07-18T15:27:38+00:00] Building version=v1.9.0-dev, profile=release, target=x86_64-unknown-linux-musl, Rust toolchain=1.76.0...
   Compiling jailer v1.9.0-dev (/firecracker/src/jailer)
   Compiling vmm v0.1.0 (/firecracker/src/vmm)
   Compiling firecracker v1.9.0-dev (/firecracker/src/firecracker)
   Compiling cpu-template-helper v1.9.0-dev (/firecracker/src/cpu-template-helper)
   Compiling snapshot-editor v1.9.0-dev (/firecracker/src/snapshot-editor)
warning: variant `ShellCommand` is never constructed
  --> src/cpu-template-helper/src/fingerprint/dump.rs:20:5
   |
12 | pub enum FingerprintDumpError {
   |          -------------------- variant in this enum
...
20 |     ShellCommand(String, String),
   |     ^^^^^^^^^^^^
   |
   = note: `FingerprintDumpError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

warning: function `run_shell_command` is never used
  --> src/cpu-template-helper/src/fingerprint/dump.rs:64:4
   |
64 | fn run_shell_command(cmd: &str) -> Result<String, FingerprintDumpError> {
   |    ^^^^^^^^^^^^^^^^^

warning: `cpu-template-helper` (bin "cpu-template-helper") generated 2 warnings
    Finished release [optimized] target(s) in 47.46s

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • [ ] If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • [ ] Any required documentation changes (code and docs) are included in this
    PR.
  • [ ] API changes follow the Runbook for Firecracker API changes.
  • [ ] User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • [ ] New TODOs link to an issue.
  • Commits meet
    contribution quality standards.

  • This functionality cannot be added in rust-vmm.

run_shell_command() is no longer used and related error variant and
tests can be dropped.

Signed-off-by: Takahiro Itazuri <[email protected]>
@zulinx86 zulinx86 self-assigned this Jul 18, 2024
@zulinx86 zulinx86 added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Jul 18, 2024
@codecov
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.08%. Comparing base (643349a) to head (d30a1fe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4690      +/-   ##
==========================================
- Coverage   82.09%   82.08%   -0.02%     
==========================================
  Files         255      255              
  Lines       31330    31312      -18     
==========================================
- Hits        25719    25701      -18     
  Misses       5611     5611              
Flag Coverage Δ
5.10-c5n.metal 82.15% <ø> (-0.02%) ⬇️
5.10-m5n.metal 82.14% <ø> (-0.01%) ⬇️
5.10-m6a.metal 81.44% <ø> (-0.02%) ⬇️
5.10-m6g.metal 79.43% <ø> (-0.02%) ⬇️
5.10-m6i.metal 82.13% <ø> (-0.02%) ⬇️
5.10-m7g.metal 79.43% <ø> (-0.02%) ⬇️
6.1-c5n.metal 82.15% <ø> (-0.02%) ⬇️
6.1-m5n.metal 82.13% <ø> (-0.02%) ⬇️
6.1-m6a.metal 81.44% <ø> (-0.02%) ⬇️
6.1-m6g.metal 79.43% <ø> (-0.02%) ⬇️
6.1-m6i.metal 82.13% <ø> (-0.02%) ⬇️
6.1-m7g.metal 79.43% <ø> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zulinx86 zulinx86 merged commit f91b800 into firecracker-microvm:main Jul 18, 2024
@zulinx86 zulinx86 deleted the fix_20240718 branch July 18, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Awaiting review Indicates that a pull request is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants