[PATCH] tests: gpt: do not munge GPT data manually

Jim Meyering meyering at redhat.com
Wed Oct 14 09:36:47 UTC 2009


Otherwise, an upcoming change would cause this test to fail.
* tests/t5000-tags.sh: Do not munge GPT data manually, since that
does not update embedded CRCs, and thus renders it invalid.
Set the attribute via "set 1 bios_grub on" instead.
---
 tests/t5000-tags.sh |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/t5000-tags.sh b/tests/t5000-tags.sh
index c5afbc2..58a23b9 100755
--- a/tests/t5000-tags.sh
+++ b/tests/t5000-tags.sh
@@ -64,11 +64,9 @@ test_expect_success \
      sed 's,.*/$dev:,$dev:,' t >> out
     '

-# Using bios_boot_magic='\x48\x61' looks nicer, but isn't portable.
-# dash's builtin printf doesn't recognize such \xHH hexadecimal escapes.
-bios_boot_magic='\110\141\150\41\111\144\157\156\164\116\145\145\144\105\106\111'
-
-printf "$bios_boot_magic" | dd of=$dev bs=$ss seek=2 conv=notrunc
+test_expect_success \
+    'set the new bios_grub attribute' \
+    'parted -m -s $dev set 1 bios_grub on'

 test_expect_success \
     'print the table (after manual modification)' \
--
1.6.5.241.g142f1



More information about the parted-devel mailing list