Skip to content

Conversation

SWITCHin2
Copy link

@SWITCHin2 SWITCHin2 commented Apr 21, 2025

Description

Fixes #331

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Test A
  • Test B

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Copy link

codecov bot commented Apr 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.47%. Comparing base (4fc4b15) to head (12aa5b3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #378      +/-   ##
==========================================
- Coverage   53.70%   51.47%   -2.23%     
==========================================
  Files         101       74      -27     
  Lines        9736     7434    -2302     
  Branches     1004      705     -299     
==========================================
- Hits         5229     3827    -1402     
+ Misses       4507     3607     -900     
Flag Coverage Δ
attach tests (uprobe & syscall trace) 97.96% <ø> (ø)
coverage-example-fedora-false-bashreadline-false ?
coverage-example-fedora-false-bashreadline-true ?
coverage-example-fedora-false-funclatency-false ?
coverage-example-fedora-false-funclatency-true ?
coverage-example-fedora-false-malloc-true ?
coverage-example-fedora-false-minimal-false ?
coverage-example-fedora-false-minimal-true ?
coverage-example-fedora-false-mountsnoop-true ?
coverage-example-fedora-false-opensnoop-libbpf-tools-true ?
coverage-example-fedora-false-opensnoop-true ?
coverage-example-fedora-false-sigsnoop-true ?
coverage-example-fedora-false-sslsniff-false ?
coverage-example-fedora-false-sslsniff-true ?
coverage-example-fedora-false-statsnoop-true ?
coverage-example-fedora-false-syscount-false ?
coverage-example-fedora-false-syscount-true ?
coverage-example-fedora-false-tailcall_minimal-true ?
coverage-example-fedora-false-usdt_minimal-false ?
coverage-example-fedora-false-usdt_minimal-true ?
coverage-example-fedora-true-bashreadline-false ?
coverage-example-fedora-true-bashreadline-true ?
coverage-example-fedora-true-funclatency-false ?
coverage-example-fedora-true-funclatency-true ?
coverage-example-fedora-true-malloc-true ?
coverage-example-fedora-true-minimal-false ?
coverage-example-fedora-true-minimal-true ?
coverage-example-fedora-true-mountsnoop-true ?
coverage-example-fedora-true-opensnoop-libbpf-tools-true ?
coverage-example-fedora-true-opensnoop-true ?
coverage-example-fedora-true-sigsnoop-true ?
coverage-example-fedora-true-sslsniff-false ?
coverage-example-fedora-true-sslsniff-true ?
coverage-example-fedora-true-statsnoop-true ?
coverage-example-fedora-true-syscount-false ?
coverage-example-fedora-true-syscount-true ?
coverage-example-fedora-true-tailcall_minimal-true ?
coverage-example-fedora-true-usdt_minimal-false ?
coverage-example-fedora-true-usdt_minimal-true ?
coverage-example-ubuntu-false-bashreadline-false ?
coverage-example-ubuntu-false-bashreadline-true ?
coverage-example-ubuntu-false-funclatency-false ?
coverage-example-ubuntu-false-funclatency-true ?
coverage-example-ubuntu-false-malloc-true ?
coverage-example-ubuntu-false-minimal-false ?
coverage-example-ubuntu-false-minimal-true ?
coverage-example-ubuntu-false-mountsnoop-true ?
coverage-example-ubuntu-false-opensnoop-libbpf-tools-true ?
coverage-example-ubuntu-false-opensnoop-true ?
coverage-example-ubuntu-false-sigsnoop-true ?
coverage-example-ubuntu-false-sslsniff-false ?
coverage-example-ubuntu-false-sslsniff-true ?
coverage-example-ubuntu-false-statsnoop-true ?
coverage-example-ubuntu-false-syscount-false ?
coverage-example-ubuntu-false-syscount-true ?
coverage-example-ubuntu-false-tailcall_minimal-true ?
coverage-example-ubuntu-false-usdt_minimal-false ?
coverage-example-ubuntu-false-usdt_minimal-true ?
coverage-example-ubuntu-true-bashreadline-false ?
coverage-example-ubuntu-true-bashreadline-true ?
coverage-example-ubuntu-true-funclatency-false ?
coverage-example-ubuntu-true-funclatency-true ?
coverage-example-ubuntu-true-malloc-true ?
coverage-example-ubuntu-true-minimal-false ?
coverage-example-ubuntu-true-minimal-true ?
coverage-example-ubuntu-true-mountsnoop-true ?
coverage-example-ubuntu-true-opensnoop-libbpf-tools-true ?
coverage-example-ubuntu-true-opensnoop-true ?
coverage-example-ubuntu-true-sigsnoop-true ?
coverage-example-ubuntu-true-sslsniff-false ?
coverage-example-ubuntu-true-sslsniff-true ?
coverage-example-ubuntu-true-statsnoop-true ?
coverage-example-ubuntu-true-syscount-false ?
coverage-example-ubuntu-true-syscount-true ?
coverage-example-ubuntu-true-tailcall_minimal-true ?
coverage-example-ubuntu-true-usdt_minimal-false ?
coverage-example-ubuntu-true-usdt_minimal-true ?
runtime tests 48.46% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SWITCHin2
Copy link
Author

SWITCHin2 commented Apr 21, 2025

@Officeyutong can you please help with passing the failing actions.


static std::pair<std::string, std::vector<std::string> >
static std::tuple<std::string, std::vector<std::string>, std::vector<const char *>>
extract_path_and_args(const argparse::ArgumentParser &parser)
Copy link
Contributor

Choose a reason for hiding this comment

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

The function name might need to be changed

log_path_string += log_path;
env_args.push_back(log_path_string.c_str());
}
if (parser.get<bool>("--allow-enternal-maps")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

enternal? typo?

const char *disable_jit_str = "BPFTIME_DISABLE_JIT=true";
env_args.push_back(disable_jit_str);
}
if (parser.get<bool>("--run-wit-kernel")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

typo?

try {
items = parser.get<std::vector<std::string> >("COMMAND");

if (parser.is_subcommand_used("load") || parser.is_subcommand_used("start")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

extract_path_and_args is receiving a sub parser, not the full parser. So there is no sub commands under it, and these parser.is_subcommand_used calls will always throw exception

@Officeyutong
Copy link
Contributor

@Officeyutong can you please help with passing the failing actions.

Reviewed

@SWITCHin2
Copy link
Author

Thanks @Officeyutong, will resolve them.

@yunwei37 yunwei37 force-pushed the master branch 2 times, most recently from cbcb1e9 to 20acd88 Compare October 1, 2025 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Support env configs as option in bpftime cli tool

2 participants