-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add command to read the VPD lock state
The lock information is returned as an array of trailing data.
- Loading branch information
Showing
6 changed files
with
114 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ mod v07; | |
mod v08; | ||
mod v09; | ||
mod v10; | ||
mod v11; | ||
|
||
pub fn assert_serialized( | ||
out: &mut [u8], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
//! The tests in this module check that the serialized form of messages from MGS | ||
//! protocol version 10 have not changed. | ||
//! | ||
//! If a test in this module fails, _do not change the test_! This means you | ||
//! have changed, deleted, or reordered an existing message type or enum | ||
//! variant, and you should revert that change. This will remain true until we | ||
//! bump the `version::MIN` to a value higher than 11, at which point these | ||
//! tests can be removed as we will stop supporting v11. | ||
|
||
use super::assert_serialized; | ||
use gateway_messages::MgsRequest; | ||
use gateway_messages::SerializedSize; | ||
use gateway_messages::SpResponse; | ||
|
||
#[test] | ||
fn sp_response() { | ||
let mut out = [0; SpResponse::MAX_SIZE]; | ||
let response = SpResponse::VpdLockState; | ||
let expected = [41]; | ||
assert_serialized(&mut out, &expected, &response); | ||
} | ||
|
||
#[test] | ||
fn host_request() { | ||
let mut out = [0; MgsRequest::MAX_SIZE]; | ||
let request = MgsRequest::VpdLockState; | ||
let expected = [41]; | ||
assert_serialized(&mut out, &expected, &request); | ||
} |