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

correct guidance for building e2e.test with debug symbols #8397

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BenTheElder
Copy link
Member

Which issue(s) this PR fixes:

Fixes # N/A

DBG=1 enables these settings and also disables stripping the binaries. The current instructions do not produce a debuggable binary.

NOTE: this change does produce a binary that can be debugged, the next bit about using it with "ginkgo.sh" is also wrong but I'm not done iterating on that part. I filed this to avoid forgetting fixing the part which I know the correct fix for already.

/cc @pohly @aojea

@k8s-ci-robot k8s-ci-robot requested review from aojea and pohly March 25, 2025 19:45
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/developer-guide Issues or PRs related to the developer guide labels Mar 25, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 25, 2025
make WHAT=test/e2e/e2e.test GOGCFLAGS="all=-N -l" GOLDFLAGS=""
# DBG=1 enables necessary debug options and disables stripping binaries
# see the makefile upstream, or use UBE_VERBOSE=3 to get the actual build commands
make WHAT=test/e2e/e2e.test DBG=1
```

Then set the env var `E2E_TEST_DEBUG_TOOL=delve` and then run the test with `./hack/ginkgo.sh` instead of `kubetest`, you should see the delve command line prompt
Copy link
Member Author

@BenTheElder BenTheElder Mar 25, 2025

Choose a reason for hiding this comment

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

Suggested change
Then set the env var `E2E_TEST_DEBUG_TOOL=delve` and then run the test with `./hack/ginkgo.sh` instead of `kubetest`, you should see the delve command line prompt
Then set the env var `E2E_TEST_DEBUG_TOOL=dlv` and then run the test with `./hack/ginkgo-e2e.sh` instead of `kubetest`, you should see the delve command line prompt
  1. dlv not delve AFAICT (the CLI != the project name)
  2. ginkgo-e2e.sh, not ginkgo.sh

That's also not enough to get it to actually work though, E2E_TEST_DEBUG_TOOL=dlv KUBERNETES_PROVIDER=skeleton ./hack/ginkgo-e2e.sh --ginkgo.focus="HTTP.proxy" fails with no output.

KUBERNETES_PROVIDER=skeleton ./hack/ginkgo-e2e.sh --ginkgo.focus="HTTP.proxy" works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/developer-guide Issues or PRs related to the developer guide cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants