From: Sam Protsenko Date: Tue, 2 Jul 2019 18:20:32 +0000 (+0300) Subject: test/py: gpt: Use long options for sgdisk X-Git-Tag: v2019.10-rc1~24^2~22 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bdfc9e8ad7e39060e60c04b882dfb2c023a689b4;p=oweals%2Fu-boot.git test/py: gpt: Use long options for sgdisk sgdisk 0.8.10.2 from AOSP doesn't support short options, failing with errors like this: sgdisk: invalid option -- 'U' Test fails due to that error. Let's use long options to make the test work with any sgdisk version. Signed-off-by: Sam Protsenko Acked-by: Stephen Warren --- diff --git a/test/py/tests/test_gpt.py b/test/py/tests/test_gpt.py index c8edb33642..229d7eb2c2 100644 --- a/test/py/tests/test_gpt.py +++ b/test/py/tests/test_gpt.py @@ -40,16 +40,19 @@ class GptTestDiskImage(object): fd = os.open(persistent, os.O_RDWR | os.O_CREAT) os.ftruncate(fd, 4194304) os.close(fd) - cmd = ('sgdisk', '-U', '375a56f7-d6c9-4e81-b5f0-09d41ca89efe', + cmd = ('sgdisk', + '--disk-guid=375a56f7-d6c9-4e81-b5f0-09d41ca89efe', persistent) u_boot_utils.run_and_log(u_boot_console, cmd) # part1 offset 1MB size 1MB - cmd = ('sgdisk', '--new=1:2048:4095', '-c 1:part1', persistent) + cmd = ('sgdisk', '--new=1:2048:4095', '--change-name=1:part1', + persistent) # part2 offset 2MB size 1.5MB u_boot_utils.run_and_log(u_boot_console, cmd) - cmd = ('sgdisk', '--new=2:4096:7167', '-c 2:part2', persistent) + cmd = ('sgdisk', '--new=2:4096:7167', '--change-name=2:part2', + persistent) u_boot_utils.run_and_log(u_boot_console, cmd) - cmd = ('sgdisk', '-l', persistent) + cmd = ('sgdisk', '--load-backup=' + persistent) u_boot_utils.run_and_log(u_boot_console, cmd) cmd = ('cp', persistent, self.path)