• Home
  • Raw
  • Download

Lines Matching refs:TEST_EQ

131 		TEST_EQ(length, sizeof(mock_rsf), "TlclRead rsf size");  in TlclRead()
135 TEST_EQ(length, sizeof(mock_rsk), "TlclRead rsk size"); in TlclRead()
151 TEST_EQ(length, sizeof(mock_rsf), "TlclWrite rsf size"); in TlclWrite()
155 TEST_EQ(length, sizeof(mock_rsk), "TlclWrite rsk size"); in TlclWrite()
249 TEST_EQ(ReadSpaceFirmware(&rsf), 0, "ReadSpaceFirmware(), v0"); in CrcTestFirmware()
260 TEST_EQ(ReadSpaceFirmware(&rsf), TPM_E_CORRUPTED_STATE, in CrcTestFirmware()
273 TEST_EQ(ReadSpaceFirmware(&rsf), 0, in CrcTestFirmware()
283 TEST_EQ(WriteSpaceFirmware(&rsf), 0, "WriteSpaceFirmware(), v0"); in CrcTestFirmware()
284 TEST_EQ(mock_rsf.struct_version, 2, "WriteSpaceFirmware(), check v2"); in CrcTestFirmware()
295 TEST_EQ(WriteSpaceFirmware(&rsf), 0, in CrcTestFirmware()
308 TEST_EQ(WriteSpaceFirmware(&rsf), 0, in CrcTestFirmware()
310 TEST_EQ(mock_rsf.struct_version, 2, "WriteSpaceFirmware(), check v2"); in CrcTestFirmware()
324 TEST_EQ(WriteSpaceFirmware(&rsf), TPM_E_CORRUPTED_STATE, in CrcTestFirmware()
352 TEST_EQ(ReadSpaceKernel(&rsk), 0, "ReadSpaceKernel(), v0"); in CrcTestKernel()
363 TEST_EQ(ReadSpaceKernel(&rsk), TPM_E_CORRUPTED_STATE, in CrcTestKernel()
376 TEST_EQ(ReadSpaceKernel(&rsk), 0, "ReadSpaceKernel(), v2, good CRC"); in CrcTestKernel()
385 TEST_EQ(WriteSpaceKernel(&rsk), 0, "WriteSpaceKernel(), v0"); in CrcTestKernel()
386 TEST_EQ(mock_rsk.struct_version, 2, "WriteSpaceKernel(), check v2"); in CrcTestKernel()
397 TEST_EQ(WriteSpaceKernel(&rsk), 0, "WriteSpaceKernel(), read noise"); in CrcTestKernel()
409 TEST_EQ(WriteSpaceKernel(&rsk), 0, "WriteSpaceKernel(), write noise"); in CrcTestKernel()
410 TEST_EQ(mock_rsk.struct_version, 2, "WriteSpaceKernel(), check v2"); in CrcTestKernel()
424 TEST_EQ(WriteSpaceKernel(&rsk), TPM_E_CORRUPTED_STATE, in CrcTestKernel()
450 TEST_EQ(TPMClearAndReenable(), 0, "TPMClearAndReenable()"); in MiscTest()
458 TEST_EQ(SafeWrite(0x123, buf, 8), 0, "SafeWrite()"); in MiscTest()
464 TEST_EQ(SafeWrite(0x123, buf, 8), TPM_E_BADINDEX, "SafeWrite() bad"); in MiscTest()
470 TEST_EQ(SafeWrite(0x123, buf, 8), 0, "SafeWrite() retry max writes"); in MiscTest()
480 TEST_EQ(SafeDefineSpace(0x123, 6, 8), 0, "SafeDefineSpace()"); in MiscTest()
486 TEST_EQ(SafeDefineSpace(0x123, 6, 8), TPM_E_BADINDEX, in MiscTest()
493 TEST_EQ(SafeDefineSpace(0x123, 6, 8), 0, in MiscTest()
514 TEST_EQ(OneTimeInitializeTPM(&rsf, &rsk), 0, "OneTimeInitializeTPM()"); in OneTimeInitTest()
534 TEST_EQ(mock_rsf.struct_version, ROLLBACK_SPACE_FIRMWARE_VERSION, in OneTimeInitTest()
536 TEST_EQ(mock_rsf.flags, 0, "rsf flags"); in OneTimeInitTest()
537 TEST_EQ(mock_rsf.fw_versions, 0, "rsf fw_versions"); in OneTimeInitTest()
538 TEST_EQ(mock_rsk.struct_version, ROLLBACK_SPACE_KERNEL_VERSION, in OneTimeInitTest()
540 TEST_EQ(mock_rsk.uid, ROLLBACK_SPACE_KERNEL_UID, "rsk uid"); in OneTimeInitTest()
541 TEST_EQ(mock_rsk.kernel_versions, 0, "rsk kernel_versions"); in OneTimeInitTest()
546 TEST_EQ(OneTimeInitializeTPM(&rsf, &rsk), 0, "OneTimeInitializeTPM()"); in OneTimeInitTest()
569 TEST_EQ(OneTimeInitializeTPM(&rsf, &rsk), 0, "OneTimeInitializeTPM()"); in OneTimeInitTest()
591 TEST_EQ(OneTimeInitializeTPM(&rsf, &rsk), TPM_E_IOERROR, in OneTimeInitTest()
607 TEST_EQ(SetupTPM(0, 0, 0, &rsf), 0, "SetupTPM()"); in SetupTpmTest()
619 TEST_EQ(SetupTPM(0, 0, 0, &rsf), TPM_E_MUST_REBOOT, in SetupTpmTest()
632 TEST_EQ(SetupTPM(0, 0, 0, &rsf), TPM_E_MUST_REBOOT, in SetupTpmTest()
645 TEST_EQ(SetupTPM(0, 0, 0, &rsf), 0, "SetupTPM() pp cmd"); in SetupTpmTest()
660 TEST_EQ(SetupTPM(0, 0, 0, &rsf), 0, "SetupTPM() no firmware space"); in SetupTpmTest()
685 TEST_EQ(SetupTPM(0, 0, 0, &rsf), TPM_E_CORRUPTED_STATE, in SetupTpmTest()
697 TEST_EQ(SetupTPM(1, 0, 0, &rsf), 0, "SetupTPM() to dev"); in SetupTpmTest()
710 TEST_EQ(mock_rsf.flags, FLAG_LAST_BOOT_DEVELOPER, in SetupTpmTest()
715 TEST_EQ(SetupTPM(0, 0, 0, &rsf), 0, "SetupTPM() from dev"); in SetupTpmTest()
728 TEST_EQ(mock_rsf.flags, 0, "fw space flags from dev 1"); in SetupTpmTest()
732 TEST_EQ(SetupTPM(0, 0, 1, &rsf), 0, "SetupTPM() clear owner"); in SetupTpmTest()
747 TEST_EQ(SetupTPM(0, 1, 0, &rsf), 0, "SetupTPM() clear virtual dev"); in SetupTpmTest()
748 TEST_EQ(mock_rsf.flags, 0, "Clear virtual dev"); in SetupTpmTest()
754 TEST_EQ(mock_rsf.flags, in SetupTpmTest()
778 TEST_EQ(RollbackFirmwareSetup(0, dev_mode, 0, &dev_mode, &version), in RollbackFirmwareTest()
787 TEST_EQ(version, 0x12345678, "RollbackFirmwareSetup() version"); in RollbackFirmwareTest()
794 TEST_EQ(RollbackFirmwareSetup(0, dev_mode, 0, &dev_mode, &version), in RollbackFirmwareTest()
800 TEST_EQ(version, 0, "RollbackFirmwareSetup() version on error"); in RollbackFirmwareTest()
805 TEST_EQ(RollbackFirmwareSetup(dev_mode, 0, 0, &dev_mode, &version), in RollbackFirmwareTest()
819 TEST_EQ(mock_rsf.flags, FLAG_LAST_BOOT_DEVELOPER, in RollbackFirmwareTest()
825 TEST_EQ(RollbackFirmwareSetup(dev_mode, 0, 1, &dev_mode, &version), in RollbackFirmwareTest()
840 TEST_EQ(RollbackFirmwareWrite(0xBEAD1234), 0, in RollbackFirmwareTest()
842 TEST_EQ(mock_rsf.fw_versions, 0xBEAD1234, in RollbackFirmwareTest()
851 TEST_EQ(RollbackFirmwareWrite(123), TPM_E_IOERROR, in RollbackFirmwareTest()
856 TEST_EQ(SetVirtualDevMode(1), 0, "SetVirtualDevMode(1)"); in RollbackFirmwareTest()
857 TEST_EQ(mock_rsf.flags, FLAG_VIRTUAL_DEV_MODE_ON, "Virtual dev on"); in RollbackFirmwareTest()
864 TEST_EQ(SetVirtualDevMode(0), 0, "SetVirtualDevMode(0)"); in RollbackFirmwareTest()
865 TEST_EQ(mock_rsf.flags, 0, "Virtual dev off"); in RollbackFirmwareTest()
874 TEST_EQ(RollbackFirmwareLock(), 0, "RollbackFirmwareLock()"); in RollbackFirmwareTest()
880 TEST_EQ(RollbackFirmwareLock(), TPM_E_IOERROR, in RollbackFirmwareTest()
897 TEST_EQ(SetupTPM(0, 0, 0, &rsf), 0, "SetupTPM()"); in RollbackKernelTest()
904 TEST_EQ(RollbackKernelRead(&version), 0, "RollbackKernelRead()"); in RollbackKernelTest()
909 TEST_EQ(version, 0x87654321, "RollbackKernelRead() version"); in RollbackKernelTest()
913 TEST_EQ(RollbackKernelRead(&version), TPM_E_IOERROR, in RollbackKernelTest()
923 TEST_EQ(RollbackKernelRead(&version), TPM_E_CORRUPTED_STATE, in RollbackKernelTest()
929 TEST_EQ(RollbackKernelRead(&version), TPM_E_CORRUPTED_STATE, in RollbackKernelTest()
934 TEST_EQ(RollbackKernelWrite(0xBEAD4321), 0, "RollbackKernelWrite()"); in RollbackKernelTest()
935 TEST_EQ(mock_rsk.kernel_versions, 0xBEAD4321, in RollbackKernelTest()
944 TEST_EQ(RollbackKernelWrite(123), TPM_E_IOERROR, in RollbackKernelTest()
949 TEST_EQ(RollbackKernelLock(0), 0, "RollbackKernelLock()"); in RollbackKernelTest()
955 TEST_EQ(RollbackKernelLock(0), TPM_E_IOERROR, in RollbackKernelTest()
961 TEST_EQ(RollbackKernelLock(1), 0, "RollbackKernelLock() in recovery"); in RollbackKernelTest()
969 TEST_EQ(RollbackS3Resume(), 0, "RollbackS3Resume()"); in RollbackS3ResumeTest()
977 TEST_EQ(RollbackS3Resume(), 0, "RollbackS3Resume() postinit"); in RollbackS3ResumeTest()
981 TEST_EQ(RollbackS3Resume(), TPM_E_IOERROR, in RollbackS3ResumeTest()