diff --git a/mountpoint-s3/src/fuse.rs b/mountpoint-s3/src/fuse.rs index 9a83485a5..00c0d0073 100644 --- a/mountpoint-s3/src/fuse.rs +++ b/mountpoint-s3/src/fuse.rs @@ -38,7 +38,7 @@ macro_rules! event { macro_rules! fuse_error { ($name:literal, $reply:expr, $err:expr) => {{ let err = $err; - event!(err.level, "{} failed: {:#}", $name, err); + event!(err.level, "{} {} failed: {:#}", $name, err.to_errno(), err); ::metrics::counter!("fuse.op_failures", "op" => $name).increment(1); $reply.error(err.to_errno()); }}; diff --git a/mountpoint-s3/tests/fuse_tests/fork_test.rs b/mountpoint-s3/tests/fuse_tests/fork_test.rs index c7c9cace0..8f64eb039 100644 --- a/mountpoint-s3/tests/fuse_tests/fork_test.rs +++ b/mountpoint-s3/tests/fuse_tests/fork_test.rs @@ -810,7 +810,7 @@ fn read_with_no_permissions_for_a_key_sse() { read_result.expect("should be able to read a default-encrypted file after the first read failure"); } - let log_line_pattern = format!("^.*WARN.*{encrypted_object}.*read failed: get request failed: get object request failed: Client error: Forbidden: User: .* is not authorized to perform: kms:Decrypt on resource: {key_id} because no session policy allows the kms:Decrypt action.*$"); + let log_line_pattern = format!("^.*WARN.*{encrypted_object}.*read 5 failed: get request failed: get object request failed: Client error: Forbidden: User: .* is not authorized to perform: kms:Decrypt on resource: {key_id} because no session policy allows the kms:Decrypt action.*$"); let expected_log_line = regex::Regex::new(&log_line_pattern).unwrap(); unmount_and_check_log(child, mount_point.path(), &expected_log_line); }