-
Notifications
You must be signed in to change notification settings - Fork 565
treewide: streamline #[source] and Error (follow-up (2/2)) #7089
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
treewide: streamline #[source] and Error (follow-up (2/2)) #7089
Conversation
vmm/src/api/http/mod.rs
Outdated
| ApiError(api_error) => write!(f, "{api_error}"), | ||
| } | ||
| } | ||
| #[error("Error from internal API: {0:?}")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm, I'm not entirely sure what is going on, but it looks like the test succeeds if I use the Display impl instead of Debug here:
#[error("Error from internal API: {0}")]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I actually wanted to use the Display impl in the first place. Might have been a typo from my side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot beliebe that the CI is actually green 😁 I'd feel uncomfortable if we merge this without
- understanding the root cause
- improve the debug experience for the next time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't have a chance to look at the code and try and reproduce manually - but I was wondering if there may have been a stray new line in the output and thus breaking the HTTP response?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other thing is that it could have been trying to do a stack unwind for the embedded debug error message which will then fail as the seccomp rules won't allow it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should ony be newlines with {0:#?} but not {0:?} 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahahaha you were right, it is a seccomp violation. I just verified this by passing --seccomp false to the CHV command line. So the debugging guide here is: Run the test without seccomp if it suspicially fails.
This streamlines the Error implementation in the Cloud Hypervisor code base to match the remaining parts so that everything follows the agreed conventions. These are leftovers missed in the previous commits. Signed-off-by: Philipp Schuster <[email protected]> On-behalf-of: SAP [email protected]
This streamlines the Error implementation in the Cloud Hypervisor code base to match the remaining parts so that everything follows the agreed conventions. These are leftovers missed in the previous commits. Signed-off-by: Philipp Schuster <[email protected]> On-behalf-of: SAP [email protected]
03897ad to
a41982a
Compare
|
@phip1611 Looking good? |
Split-out of the problematic part of #7085. The commits
somehow introduce the problem.
I'm seeking help and guidance; I have no idea how to debug the failing
test_api_http_pause_resumetest efficiently. Failing Output ExampleUsing
bash ./scripts/dev_cli.sh tests --integration -- --test-filter test_api_http_pause_resume -- --show-output, I could reduce the feedback loop to around six minutes on my machine, which is not very pleasant to work with. Thanks for any help in advance!Steps to Undraft