MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / test_ptminit

Function test_ptminit

tpm/src/lib.rs:410–419  ·  view source on GitHub ↗

PtmInit Testing */

()

Source from the content-addressed store, hash-verified

408 #[test]
409 /*PtmInit Testing */
410 fn test_ptminit() -> Result<()> {
411 let mut init: PtmInit = PtmInit::new();
412 init.init_flags = 0x1;
413 let buf = init.ptm_to_request();
414 assert_eq!(buf, [0x0, 0x0, 0x0, 0x1]);
415 let response_buf: &[u8] = &[0, 0, 0xE, 0];
416 init.update_ptm_with_response(response_buf)?;
417 assert_eq!(init.get_result_code(), 0xE00);
418 Ok(())
419 }
420 #[test]
421 /* PtmSetBufferSize Testing */
422 fn test_ptmsetbuffersize() -> Result<()> {

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
ptm_to_requestMethod · 0.80

Tested by

no test coverage detected