Skip to content

Commit 800d61f

Browse files
authored
Merge branch 'main' into fix/retry_serial_tests
2 parents f9b91a0 + d988dbd commit 800d61f

10 files changed

Lines changed: 16 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ and this project adheres to
9090
- [#5818](https://github.com/firecracker-microvm/firecracker/pull/5818): Reject
9191
device status writes that clear previously set bits in the MMIO transport,
9292
except for reset.
93+
- [#5884](https://github.com/firecracker-microvm/firecracker/pull/5884):
94+
Corrected the OpenAPI spec for `PATCH /balloon/hinting/start` and
95+
`PATCH /balloon/hinting/stop` to declare `204 No Content` instead of `200`,
96+
matching the actual runtime response.
9397

9498
## [1.15.0]
9599

src/firecracker/swagger/firecracker.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ paths:
181181
schema:
182182
$ref: "#/definitions/BalloonStartCmd"
183183
responses:
184-
200:
184+
204:
185185
description: Free page hinting run started.
186186
400:
187187
description: The balloon free hinting was not enabled when the device was configured.
@@ -215,7 +215,7 @@ paths:
215215
summary: Stops a free page hinting run only if enabled pre-boot.
216216
operationId: stopBalloonHinting
217217
responses:
218-
200:
218+
204:
219219
description: Free page hinting run stopped.
220220
400:
221221
description: The balloon free hinting was not enabled when the device was configured.

src/snapshot-editor/src/edit_memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ mod tests {
246246
// expected: [d] [b] [d] [d] [b]
247247
let base_block = rand::rand_bytes(block_size);
248248
// Adding to the base file 2 times because
249-
// it is 1 block smaller then diff right now.
249+
// it is 1 block smaller than diff right now.
250250
base_file.write_all(&base_block).unwrap();
251251
base_file.write_all(&base_block).unwrap();
252252
expected_result.extend(base_block);

src/vmm/src/arch/aarch64/regs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub const KVM_REG_ARM64_SVE_VLS: u64 =
127127
KVM_REG_ARM64 | KVM_REG_ARM64_SVE as u64 | KVM_REG_SIZE_U512 | 0xffff;
128128

129129
/// Program Counter
130-
/// The offset value (0x100 = 32 * 8) is calcuated as follows:
130+
/// The offset value (0x100 = 32 * 8) is calculated as follows:
131131
/// - `kvm_regs` includes `regs` field of type `user_pt_regs` at the beginning (i.e., at offset 0).
132132
/// - `pc` follows `regs[31]` and `sp` within `user_pt_regs` and they are 8 bytes each (i.e. the
133133
/// offset is (31 + 1) * 8 = 256).
@@ -196,7 +196,7 @@ impl From<usize> for RegSize {
196196
RegSize::U512_SIZE => RegSize::U512,
197197
RegSize::U1024_SIZE => RegSize::U1024,
198198
RegSize::U2048_SIZE => RegSize::U2048,
199-
_ => unreachable!("Registers bigger then 2048 bits are not supported"),
199+
_ => unreachable!("Registers bigger than 2048 bits are not supported"),
200200
}
201201
}
202202
}

src/vmm/src/cpu_config/x86_64/cpuid/amd/normalize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ impl super::AmdCpuid {
214214
/// This value allows at most 64 logical threads within a package.
215215
const THREAD_ID_MAX_SIZE: u32 = 7;
216216

217-
// We don't support more then 128 threads right now.
217+
// We don't support more than 128 threads right now.
218218
// It's safe to put them all on the same processor.
219219
let leaf_80000008 = self
220220
.get_mut(&CpuidKey::leaf(0x80000008))

src/vmm/src/devices/virtio/balloon/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn default_ack_on_stop() -> bool {
9292
true
9393
}
9494

95-
/// Command recieved from the API to start a hinting run
95+
/// Command received from the API to start a hinting run
9696
#[derive(Copy, Clone, Debug, Eq, PartialEq, Deserialize)]
9797
pub struct StartHintingCmd {
9898
/// If we should automatically acknowledge end of the run after stop.

src/vmm/src/devices/virtio/net/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static METRICS: RwLock<NetMetricsPerDevice> = RwLock::new(NetMetricsPerDevice {
126126
pub fn flush_metrics<S: Serializer>(serializer: S) -> Result<S::Ok, S::Error> {
127127
let net_metrics = METRICS.read().unwrap();
128128
let metrics_len = net_metrics.metrics.len();
129-
// +1 to accomodate aggregate net metrics
129+
// +1 to accommodate aggregate net metrics
130130
let mut seq = serializer.serialize_map(Some(1 + metrics_len))?;
131131

132132
let mut net_aggregated: NetDeviceMetrics = NetDeviceMetrics::default();

src/vmm/src/devices/virtio/vsock/unix/muxer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl VsockEpollListener for VsockMuxer {
282282
EventSet::IN
283283
}
284284

285-
/// Notify the muxer about a pending event having occured under its nested epoll FD.
285+
/// Notify the muxer about a pending event having occurred under its nested epoll FD.
286286
fn notify(&mut self, _: EventSet) {
287287
let mut epoll_events = vec![EpollEvent::new(EventSet::empty(), 0); 32];
288288
match self.epoll.wait(0, epoll_events.as_mut_slice()) {

src/vmm/src/mmds/ns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl MmdsNetworkStack {
140140
///
141141
/// # Returns
142142
///
143-
/// `true` if the frame was consumed by `mmds` or `false` if an error occured
143+
/// `true` if the frame was consumed by `mmds` or `false` if an error occurred
144144
pub fn detour_frame(&mut self, src: &[u8]) -> bool {
145145
if let Ok(eth) = EthernetFrame::from_bytes(src) {
146146
match eth.ethertype() {

src/vmm/src/snapshot/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub enum SnapshotError {
5757
InvalidFormatVersion(Version),
5858
/// Magic value does not match arch: {0}
5959
InvalidMagic(u64),
60-
/// An error occured during bitcode serialization: {0}
60+
/// An error occurred during bitcode serialization: {0}
6161
Bitcode(#[from] bitcode::Error),
6262
/// IO Error: {0}
6363
Io(#[from] std::io::Error),
@@ -206,7 +206,7 @@ impl<Data: DeserializeOwned> Snapshot<Data> {
206206
let computed_checksum = crc64(0, buf.as_slice());
207207
// When we read the entire file, we also read the checksum into the buffer. The CRC has the
208208
// property that crc(0, buf.as_slice()) == 0 iff the last 8 bytes of buf are the checksum
209-
// of all the preceeding bytes, and this is the property we are using here.
209+
// of all the preceding bytes, and this is the property we are using here.
210210
if computed_checksum != 0 {
211211
return Err(SnapshotError::Crc64);
212212
}
@@ -251,9 +251,6 @@ mod tests {
251251
let mut snapshot_data = Vec::new();
252252
snapshot.save(&mut snapshot_data).unwrap();
253253

254-
// Debug: print the length to understand what's happening
255-
println!("Snapshot data length: {}", snapshot_data.len());
256-
257254
assert_eq!(
258255
get_format_version(&mut std::io::Cursor::new(&snapshot_data)).unwrap(),
259256
SNAPSHOT_VERSION

0 commit comments

Comments
 (0)