diff options
author | Bill Richardson <wfrichar@chromium.org> | 2010-06-03 15:20:19 -0700 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2010-06-03 15:20:19 -0700 |
commit | 31066a4515824c6d8cf8f69f5cecfb4b508bddba (patch) | |
tree | b250591885058d9eb342eda0296bc524c4c9098a /tests/cgptlib_test.c | |
parent | 08dc5f381d2e144428bfc25b0881a435fd1ca155 (diff) | |
download | vboot-31066a4515824c6d8cf8f69f5cecfb4b508bddba.tar.gz |
Ignore the AlternateLBA field in the GPT headers.
We know where to look, and we'll look there regardless. We don't care where
the header creator thinks it should be.
Update tests to match.
Oh, and don't assume that I mean "/dev/FOO" if I just say "FOO". That's
really annoying.
Review URL: http://codereview.chromium.org/2606002
Diffstat (limited to 'tests/cgptlib_test.c')
-rw-r--r-- | tests/cgptlib_test.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/cgptlib_test.c b/tests/cgptlib_test.c index 80dc264d..1ab5342a 100644 --- a/tests/cgptlib_test.c +++ b/tests/cgptlib_test.c @@ -454,19 +454,20 @@ static int MyLbaTest() { EXPECT(1 == CheckHeader(h1, 0, gpt->drive_sectors)); EXPECT(1 == CheckHeader(h2, 1, gpt->drive_sectors)); + /* We should ignore the alternate_lba field entirely */ BuildTestGptData(gpt); h1->alternate_lba++; h2->alternate_lba++; RefreshCrc32(gpt); - EXPECT(1 == CheckHeader(h1, 0, gpt->drive_sectors)); - EXPECT(1 == CheckHeader(h2, 1, gpt->drive_sectors)); + EXPECT(0 == CheckHeader(h1, 0, gpt->drive_sectors)); + EXPECT(0 == CheckHeader(h2, 1, gpt->drive_sectors)); BuildTestGptData(gpt); h1->alternate_lba--; h2->alternate_lba--; RefreshCrc32(gpt); - EXPECT(1 == CheckHeader(h1, 0, gpt->drive_sectors)); - EXPECT(1 == CheckHeader(h2, 1, gpt->drive_sectors)); + EXPECT(0 == CheckHeader(h1, 0, gpt->drive_sectors)); + EXPECT(0 == CheckHeader(h2, 1, gpt->drive_sectors)); BuildTestGptData(gpt); h1->entries_lba++; |