mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Replace Debug with Display rendering in HTTP error message
Bumping anyhow crate from 1.0.75 to 1.0.79 will cause seccomp failures through integration tests. Newly added backtrace support relies on readlink and many other syscalls. Issue noticed with test_api_http_pause_resume test, where second time of VM PAUSE or VM RESUME prints error and causes panic. Noticed that panic message in a thread which is not allowed to write output triggered the issue. So implementing Display trait for HttpError and ApiError enums to avoid adding many syscalls to seccomp filter section. Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
9cb996db09
commit
895dc12a74
@@ -41,8 +41,8 @@ pub struct DBusApi {
|
||||
api_sender: futures::lock::Mutex<Sender<ApiRequest>>,
|
||||
}
|
||||
|
||||
fn api_error(error: impl std::fmt::Debug) -> fdo::Error {
|
||||
fdo::Error::Failed(format!("{error:?}"))
|
||||
fn api_error(error: impl std::fmt::Debug + std::fmt::Display) -> fdo::Error {
|
||||
fdo::Error::Failed(format!("{error}"))
|
||||
}
|
||||
|
||||
// This method is intended to ensure that the DBusApi thread has enough time to
|
||||
|
||||
Reference in New Issue
Block a user