From: Jim Meyering Date: Mon, 19 Oct 2009 16:55:06 +0000 (+0200) Subject: tests: hook up new GPT-crc-corrupting script X-Git-Tag: android-x86-4.4-r1~595 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f3e3e9a5c702c5b2254f6246fd466e309e60d6ba;p=android-x86%2Fexternal-parted.git tests: hook up new GPT-crc-corrupting script * tests/Makefile.am (TESTS): Add t0280-gpt-corrupt.sh. * libparted/labels/gpt.c (gpt_read): Change diagnostic to say that the PTE CRC mismatch is in the primary table. * tests/t0280-gpt-corrupt.sh: Tweak diagnostic to match what the code now prints. --- diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c index daac677..5131ebe 100644 --- a/libparted/labels/gpt.c +++ b/libparted/labels/gpt.c @@ -940,7 +940,7 @@ gpt_read (PedDisk *disk) ped_exception_throw (PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL, - _("partition table array (FIXME:which?) CRC mismatch")); + _("primary partition table array CRC mismatch")); goto error_free_ptes; } diff --git a/tests/Makefile.am b/tests/Makefile.am index 42badff..0d393a6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,6 +7,7 @@ TESTS = \ t0202-gpt-pmbr.sh \ t0220-gpt-msftres.sh \ t0250-gpt.sh \ + t0280-gpt-corrupt.sh \ t0300-dos-on-gpt.sh \ t0400-loop-clobber-infloop.sh \ t1000-mkpartfs.sh \ diff --git a/tests/t0280-gpt-corrupt.sh b/tests/t0280-gpt-corrupt.sh index 89ab818..3addcc2 100755 --- a/tests/t0280-gpt-corrupt.sh +++ b/tests/t0280-gpt-corrupt.sh @@ -89,7 +89,7 @@ test_expect_success \ test_expect_success \ 'check for expected diagnostic' \ - 'echo "Error: partition table array CRC mismatch" > exp && + 'echo "Error: primary partition table array CRC mismatch" > exp && compare exp err' test_done