summaryrefslogtreecommitdiff
path: root/tests/run_cgpt_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run_cgpt_tests.sh')
-rwxr-xr-xtests/run_cgpt_tests.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/run_cgpt_tests.sh b/tests/run_cgpt_tests.sh
index 7170eef8..5176017a 100755
--- a/tests/run_cgpt_tests.sh
+++ b/tests/run_cgpt_tests.sh
@@ -291,6 +291,12 @@ $CGPT find $MTD -t kernel ${DEV} >/dev/null
# Enable write access again to test boundary in off device storage
chmod 600 ${DEV}
+# GPT too small
+dd if=/dev/zero of=${DEV} bs=5632 count=1
+assert_fail $CGPT create -D 1024 ${DEV}
+# GPT is just right for 16 entries (512 + 512 + 16 * 128) * 2 = 6144
+dd if=/dev/zero of=${DEV} bs=6144 count=1
+$CGPT create -D 1024 ${DEV}
# Create a small 8K file to simulate Flash NOR section
dd if=/dev/zero of=${DEV} bs=8K count=1
# Drive size is not multiple of 512