diff options
Diffstat (limited to 'tests/vboot_kernel_tests.c')
-rw-r--r-- | tests/vboot_kernel_tests.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/vboot_kernel_tests.c b/tests/vboot_kernel_tests.c index c546ed12..6f47ae35 100644 --- a/tests/vboot_kernel_tests.c +++ b/tests/vboot_kernel_tests.c @@ -289,7 +289,7 @@ static void ReadWriteGptTest(void) GptHeader *h; g.sector_bytes = MOCK_SECTOR_SIZE; - g.drive_sectors = g.gpt_drive_sectors = MOCK_SECTOR_COUNT; + g.streaming_drive_sectors = g.gpt_drive_sectors = MOCK_SECTOR_COUNT; g.valid_headers = g.valid_entries = MASK_BOTH; ResetMocks(); @@ -315,11 +315,11 @@ static void ReadWriteGptTest(void) Memset(mock_gpt_primary, '\0', sizeof(*mock_gpt_primary)); TEST_EQ(AllocAndReadGptData(handle, &g), 0, "AllocAndRead primary invalid"); - TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.drive_sectors, - g.gpt_drive_sectors, GPT_STORED_ON_DEVICE), + TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.streaming_drive_sectors, + g.gpt_drive_sectors, 0), 1, "Primary header is invalid"); - TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.drive_sectors, - g.gpt_drive_sectors, GPT_STORED_ON_DEVICE), + TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.streaming_drive_sectors, + g.gpt_drive_sectors, 0), 0, "Secondary header is valid"); TEST_CALLS("VbExDiskRead(h, 1, 1)\n" "VbExDiskRead(h, 1023, 1)\n" @@ -334,11 +334,11 @@ static void ReadWriteGptTest(void) Memset(mock_gpt_secondary, '\0', sizeof(*mock_gpt_secondary)); TEST_EQ(AllocAndReadGptData(handle, &g), 0, "AllocAndRead secondary invalid"); - TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.drive_sectors, - g.gpt_drive_sectors, GPT_STORED_ON_DEVICE), + TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.streaming_drive_sectors, + g.gpt_drive_sectors, 0), 0, "Primary header is valid"); - TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.drive_sectors, - g.gpt_drive_sectors, GPT_STORED_ON_DEVICE), + TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.streaming_drive_sectors, + g.gpt_drive_sectors, 0), 1, "Secondary header is invalid"); TEST_CALLS("VbExDiskRead(h, 1, 1)\n" "VbExDiskRead(h, 2, 32)\n" @@ -354,11 +354,11 @@ static void ReadWriteGptTest(void) Memset(mock_gpt_secondary, '\0', sizeof(*mock_gpt_secondary)); TEST_EQ(AllocAndReadGptData(handle, &g), 1, "AllocAndRead primary and secondary invalid"); - TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.drive_sectors, - g.gpt_drive_sectors, GPT_STORED_ON_DEVICE), + TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.streaming_drive_sectors, + g.gpt_drive_sectors, 0), 1, "Primary header is invalid"); - TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.drive_sectors, - g.gpt_drive_sectors, GPT_STORED_ON_DEVICE), + TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.streaming_drive_sectors, + g.gpt_drive_sectors, 0), 1, "Secondary header is invalid"); TEST_CALLS("VbExDiskRead(h, 1, 1)\n" "VbExDiskRead(h, 1023, 1)\n"); @@ -385,8 +385,8 @@ static void ReadWriteGptTest(void) "VbExDiskRead(h, 991, 32)\n" "VbExDiskWrite(h, 1, 1)\n" "VbExDiskWrite(h, 2, 32)\n"); - TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.drive_sectors, - g.gpt_drive_sectors, GPT_STORED_ON_DEVICE), + TEST_EQ(CheckHeader(mock_gpt_primary, 0, g.streaming_drive_sectors, + g.gpt_drive_sectors, 0), 0, "Fix Primary GPT: Primary header is valid"); /* @@ -410,8 +410,8 @@ static void ReadWriteGptTest(void) "VbExDiskRead(h, 1023, 1)\n" "VbExDiskWrite(h, 1023, 1)\n" "VbExDiskWrite(h, 991, 32)\n"); - TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.drive_sectors, - g.gpt_drive_sectors, GPT_STORED_ON_DEVICE), + TEST_EQ(CheckHeader(mock_gpt_secondary, 1, g.streaming_drive_sectors, + g.gpt_drive_sectors, 0), 0, "Fix Secondary GPT: Secondary header is valid"); /* Data which is changed is written */ |