]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Add few more tests.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 30 Apr 2013 15:41:32 +0000 (17:41 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 30 Apr 2013 15:41:32 +0000 (17:41 +0200)
17 files changed:
ChangeLog
Makefile.util.def
tests/ahci_test.in
tests/cdboot_test.in
tests/core_compress_test.in
tests/ehci_test.in
tests/fddboot_test.in
tests/grub_cmd_date.in
tests/grub_cmd_set_date.in [new file with mode: 0644]
tests/grub_cmd_sleep.in [new file with mode: 0644]
tests/hddboot_test.in
tests/netboot_test.in
tests/ohci_test.in
tests/partmap_test.in
tests/pata_test.in
tests/uhci_test.in
tests/util/grub-shell.in

index b924457921c807ce72571663039b368a8798f108..642858ce337cc9fcbaf8ba1dc0bf54489228faaa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-04-30  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Add few more tests.
+
 2013-04-30  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * include/grub/arc/arc.h: Account for missing "other" peripheral on
index 3cfc592dcd794c78f4151a19d0ad708885bfaec7..fbd37ebb6460d4bc485ac05a52f38e38ae626c72 100644 (file)
@@ -700,6 +700,18 @@ script = {
   common = tests/grub_cmd_date.in;
 };
 
+script = {
+  testcase;
+  name = grub_cmd_set_date;
+  common = tests/grub_cmd_set_date.in;
+};
+
+script = {
+  testcase;
+  name = grub_cmd_sleep;
+  common = tests/grub_cmd_sleep.in;
+};
+
 script = {
   testcase;
   name = grub_script_expansion;
index fa5314c9705808144ac76d3d9287c9794bb0dd59..e7d26ac076f80389f0563bda22a106fe765ef20e 100644 (file)
@@ -20,12 +20,13 @@ grubshell=@builddir@/grub-shell
 . "@builddir@/grub-core/modinfo.sh"
 
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # PLATFORM: Don't mess with real devices when OS is active
     *-emu)
        exit 0;;
     # FIXME: qemu gets bonito DMA wrong
     mipsel-loongson)
        exit 0;;
-    # no AHCI on ARC and qemu-mips platforms
+    # PLATFORM: no AHCI on ARC and qemu-mips platforms
     mips*-arc | mips*-qemu_mips)
        exit 0;;
     # FIXME: No native drivers are available for those
index 097964f95fd5e4f890427d41662e9827d895915a..1cc901977c229dcf839bf58bede2b34f04252d57 100644 (file)
@@ -20,9 +20,10 @@ grubshell=@builddir@/grub-shell
 . "@builddir@/grub-core/modinfo.sh"
 
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # PLATFORM: emu is different
     *-emu)
        exit 0;;
-    # Flash targets
+    # PLATFORM: Flash targets
     i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
        exit 0;;
     # FIXME: currently grub-shell uses only -kernel for loongson
index bd57f6f5642dd48f010fb214cdc1ca99e7664347..f97c0240b8f85504d34e8a87038493cc3f407899 100644 (file)
@@ -19,8 +19,8 @@ grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
 
-# FIXME: Only mips currently supports configurable core compression
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # FIXME: Only mips currently supports configurable core compression
     *-emu | i386-* | x86_64-* | sparc64-* | ia64-*)
        exit 0
        ;;
index d9999f8e6bdab78396e3a48570986bfb77e4e827..5cfe726df326c2cd5ff90bafcb1219fa0db8f344 100644 (file)
@@ -20,12 +20,13 @@ grubshell=@builddir@/grub-shell
 . "@builddir@/grub-core/modinfo.sh"
 
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # PLATFORM: Don't mess with real devices when OS is active
     *-emu)
        exit 0;;
     # FIXME: qemu gets bonito DMA wrong
     mipsel-loongson)
        exit 0;;
-    # no USB on ARC and qemu-mips platforms
+    # PLATFORM: no USB on ARC and qemu-mips platforms
     mips*-arc | mips*-qemu_mips)
        exit 0;;
     # FIXME: No native drivers are available for those
index 0866fdc8e448d03424f6190dec1a888e873cbeb6..a05eb3e7588f2daf60fa7ad62f0a7cd9d16b6eb9 100644 (file)
@@ -20,9 +20,10 @@ grubshell=@builddir@/grub-shell
 . "@builddir@/grub-core/modinfo.sh"
 
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # PLATFORM: emu is different
     *-emu)
        exit 0;;
-    # Flash targets
+    # PLATFORM: Flash targets
     i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
        exit 0;;
     # FIXME: currently grub-shell uses only -kernel for loongson
@@ -40,7 +41,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # FIXME: QEMU doesn't emulate SCSI floppies
     mipsel-arc | mips-arc)
        exit 0;;
-    # powerpc doesn't boot from floppy except OldWorld Macs which we don't support anyway
+    # PLATFORM: powerpc doesn't boot from floppy except OldWorld Macs which we don't support anyway
     powerpc-ieee1275)
        exit 0;;
 esac
index 0417c67efc67ab50501d5427aa2e22a03228e25f..a459353e8a51c22fb966a842af532cff904de2a3 100644 (file)
@@ -13,8 +13,17 @@ dt=`echo date | @builddir@/grub-shell`
 dtg="$(date -u -d "$dt" +%s)"
 ndt="$(date -u +%s)"
 
-if [ $pdt -le $dtg ] && [ $dtg -le $ndt ]; then
-    exit 0;
+if [ $pdt -gt $dtg ] || [ $dtg -gt $ndt ]; then
+  echo "Date not in range: $pdt <= $dtg <= $ndt"
+  exit 1
+fi
+
+pdt="$(date -u +%s)"
+dt=`echo 'insmod datehook; echo $YEAR-$MONTH-$DAY $HOUR:$MINUTE:$SECOND' | @builddir@/grub-shell`
+dtg="$(date -u -d "$dt" +%s)"
+ndt="$(date -u +%s)"
+
+if [ $pdt -gt $dtg ] || [ $dtg -gt $ndt ]; then
+  echo "Date not in range: $pdt <= $dtg <= $ndt"
+  exit 1
 fi
-echo "Date not in range: $pdt <= $dtg <= $ndt"
-exit 1
diff --git a/tests/grub_cmd_set_date.in b/tests/grub_cmd_set_date.in
new file mode 100644 (file)
index 0000000..c594ae3
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/bash
+set -e
+
+. "@builddir@/grub-core/modinfo.sh"
+
+case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # FIXME: OpenBIOS on sparc64 doesn't implement RTC
+    sparc64-ieee1275)
+       exit 0;;
+    # PLATFORM: ARC doesn't provide any way to set time
+    *-arc)
+       exit 0;;
+    # PLATFORM: EMU doesn't provide any way to set time
+    # Even if it did we'd need some kind of sandbox to avoid
+    # modifying real system time.
+    *-emu)
+       exit 0;;
+esac
+
+out=$(cat <<EOF | @builddir@/grub-shell
+insmod datehook
+date
+if [ \$YEAR = 2004 -a \$MONTH = 4 -a \$DAY = 4 -a \$HOUR = 20 -a \$MINUTE = 47 ]; then
+  hello
+  halt
+fi
+date 2004-04-04 20:47:00
+reboot
+EOF
+)
+
+if [ "$(echo "$out" | tail -n 1)" != "Hello World" ]; then
+  echo "Test failed: $out"
+  exit 1
+fi
diff --git a/tests/grub_cmd_sleep.in b/tests/grub_cmd_sleep.in
new file mode 100644 (file)
index 0000000..1c84fbf
--- /dev/null
@@ -0,0 +1,20 @@
+#! /bin/bash
+set -e
+
+. "@builddir@/grub-core/modinfo.sh"
+
+# FIXME: OpenBIOS on sparc64 doesn't implement RTC
+if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = sparc64-ieee1275 ]; then
+    exit 0
+fi
+
+# Compare RTC with interval timer.
+# Not 100% proper but should check that timer is running ok
+dt=`echo 'date; sleep 10; date' | @builddir@/grub-shell`
+dt1="$(date -u -d "$(echo "$dt" | head -n 1)" +%s)"
+dt2="$(date -u -d "$(echo "$dt" | tail -n 1)" +%s)"
+
+if [ $((dt2 - dt1)) -gt 11 ] || [ $((dt2 - dt1)) -lt 9 ]; then
+  echo "Interval not in range $dt2-$dt1 != 10"
+  exit 1
+fi
index 34257a3605f20756fffdd549a3a346bc7641452c..2cbbf97ec7fe0aa8875f7f2b85d28ffa6d681ab0 100644 (file)
@@ -20,9 +20,10 @@ grubshell=@builddir@/grub-shell
 . "@builddir@/grub-core/modinfo.sh"
 
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # PLATFORM: emu is different
     *-emu)
        exit 0;;
-    # Flash targets
+    # PLATFORM: Flash targets
     i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
        exit 0;;
     # FIXME: currently grub-shell uses only -kernel for loongson
index aeb1db037e4cc198f8fef4bd585e0e0c492ea259..c757023d989e89a9400dbbc79e674edd5bea9fd6 100644 (file)
@@ -20,9 +20,10 @@ grubshell=@builddir@/grub-shell
 . "@builddir@/grub-core/modinfo.sh"
 
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # PLATFORM: emu is different
     *-emu)
        exit 0;;
-    # Flash targets
+    # PLATFORM: Flash targets
     i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
        exit 0;;
     # FIXME: currently grub-shell uses only -kernel for loongson
index d6c1e0c93f927727e21bd458766f5d8d1fda5581..f841bd25c3f6c2fa13b761f553f3f56c4b0fa1c8 100644 (file)
@@ -20,12 +20,13 @@ grubshell=@builddir@/grub-shell
 . "@builddir@/grub-core/modinfo.sh"
 
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # PLATFORM: Don't mess with real devices when OS is active
     *-emu)
        exit 0;;
     # FIXME: qemu gets bonito DMA wrong
     mipsel-loongson)
        exit 0;;
-    # no USB on ARC and qemu-mips platforms
+    # PLATFORM: no USB on ARC and qemu-mips platforms
     mips*-arc | mips*-qemu_mips)
        exit 0;;
     # FIXME: No native drivers are available for those
index 2d4b54ed062bd8b9a2265e37ca20cd2311f23cb2..5be7b9dfb541f7b4cafbe6841e104f6f10d8bd3b 100644 (file)
@@ -253,13 +253,19 @@ ${parted} -a none -s "${imgfile}" mklabel sun mkpart 0 10M mkpart 10M 20M mkpart
 list_parts part_sun "${imgfile}" "${outfile}"
 check_output "${outfile}" $disk $disk,sun1 $disk,sun2 $disk,sun4 $disk,sun5 $disk,sun6 $disk,sun7
 
+# 7 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel sun mkpart 0 10M mkpart 10M 20M mkpart 20M 30M mkpart 30M 40M mkpart 40M 50M mkpart 50M 60M mkpart 60M 70M
+list_parts part_sun "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,sun1 $disk,sun2 $disk,sun4 $disk,sun5 $disk,sun6 $disk,sun7 $disk,sun8
+
 
 #
 # Apple partition types
 #
 # Partition table itself is part of some partition, so there is always
-# a partition by default.  But I don't understand why GRUB displays
-# two partitions by default :-(
+# a partition by default.  Furthermore free space is also a partition,
+# so there is always at least 2 partitions
 #
 
 echo "Checking APPLE partition types..."
@@ -305,3 +311,153 @@ create_disk_image "${imgfile}" 128
 ${parted} -a none -s "${imgfile}" mklabel mac mkpart a 1M 10M mkpart b 10M 20M mkpart c 20M 30M mkpart d 30M 40M mkpart e 40M 50M mkpart f 50M 60M
 list_parts part_apple "${imgfile}" "${outfile}"
 check_output "${outfile}" $disk $disk,apple1 $disk,apple2 $disk,apple4 $disk,apple5 $disk,apple6 $disk,apple7 $disk,apple8
+
+#
+# DVH partition types
+#
+# Partition #11 is reserved for whole disk by parted.
+# Parted also aliases #9 as whole disk
+#
+
+echo "Checking DVH partition types..."
+
+# 0 parts
+create_disk_image "${imgfile}" 64
+${parted} -a none -s "${imgfile}" mklabel dvh
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk
+
+# 1 parts
+create_disk_image "${imgfile}" 64
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M 
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1
+
+# 2 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2
+
+# 3 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3
+
+# 4 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4
+
+# 5 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M mkpart primary 40M 50M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4 $disk,dvh5
+
+# 6 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M mkpart primary 40M 50M mkpart primary 50M 60M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4 $disk,dvh5 $disk,dvh6
+
+# 7 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M mkpart primary 40M 50M mkpart primary 50M 60M mkpart primary 60M 70M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4 $disk,dvh5 $disk,dvh6 $disk,dvh7
+
+# 8 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M mkpart primary 40M 50M mkpart primary 50M 60M mkpart primary 60M 70M mkpart primary 70M 80M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4 $disk,dvh5 $disk,dvh6 $disk,dvh7 $disk,dvh8
+
+# 9 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M mkpart primary 40M 50M mkpart primary 50M 60M mkpart primary 60M 70M mkpart primary 70M 80M mkpart primary 80M 90M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4 $disk,dvh5 $disk,dvh6 $disk,dvh7 $disk,dvh8  $disk,dvh10
+
+# 10 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M mkpart primary 40M 50M mkpart primary 50M 60M mkpart primary 60M 70M mkpart primary 70M 80M mkpart primary 80M 90M mkpart primary 90M 100M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4 $disk,dvh5 $disk,dvh6 $disk,dvh7 $disk,dvh8 $disk,dvh10 $disk,dvh12
+
+# 11 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M mkpart primary 40M 50M mkpart primary 50M 60M mkpart primary 60M 70M mkpart primary 70M 80M mkpart primary 80M 90M mkpart primary 90M 100M mkpart primary 100M 110M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4 $disk,dvh5 $disk,dvh6 $disk,dvh7 $disk,dvh8 $disk,dvh10 $disk,dvh12 $disk,dvh13
+
+# 12 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M mkpart primary 40M 50M mkpart primary 50M 60M mkpart primary 60M 70M mkpart primary 70M 80M mkpart primary 80M 90M mkpart primary 90M 100M mkpart primary 100M 110M mkpart primary 110M 120M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4 $disk,dvh5 $disk,dvh6 $disk,dvh7 $disk,dvh8 $disk,dvh10 $disk,dvh12 $disk,dvh13 $disk,dvh14
+
+# 13 parts
+create_disk_image "${imgfile}" 135
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M mkpart primary 40M 50M mkpart primary 50M 60M mkpart primary 60M 70M mkpart primary 70M 80M mkpart primary 80M 90M mkpart primary 90M 100M mkpart primary 100M 110M mkpart primary 110M 120M mkpart primary 120M 130M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4 $disk,dvh5 $disk,dvh6 $disk,dvh7 $disk,dvh8 $disk,dvh10 $disk,dvh12 $disk,dvh13 $disk,dvh14 $disk,dvh15
+
+# 14 parts
+create_disk_image "${imgfile}" 145
+${parted} -a none -s "${imgfile}" mklabel dvh mkpart primary 3M 10M mkpart primary 10M 20M mkpart primary 20M 30M mkpart primary 30M 40M mkpart primary 40M 50M mkpart primary 50M 60M mkpart primary 60M 70M mkpart primary 70M 80M mkpart primary 80M 90M mkpart primary 90M 100M mkpart primary 100M 110M mkpart primary 110M 120M mkpart primary 120M 130M mkpart primary 130M 140M
+list_parts part_dvh "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,dvh1 $disk,dvh2 $disk,dvh3 $disk,dvh4 $disk,dvh5 $disk,dvh6 $disk,dvh7 $disk,dvh8 $disk,dvh10 $disk,dvh12 $disk,dvh13 $disk,dvh14 $disk,dvh15 $disk,dvh16
+
+echo "Checking AMIGA partition types..."
+
+# 0 parts
+create_disk_image "${imgfile}" 64
+${parted} -a none -s "${imgfile}" mklabel amiga
+list_parts part_amiga "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk
+
+# 1 parts
+create_disk_image "${imgfile}" 64
+${parted} -a none -s "${imgfile}" mklabel amiga mkpart x 0 10M 
+list_parts part_amiga "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,amiga1
+
+# 2 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel amiga mkpart x 0 10M mkpart x 10M 20M
+list_parts part_amiga "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,amiga1 $disk,amiga2
+
+# 3 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel amiga mkpart x 0 10M mkpart x 10M 20M mkpart x 20M 30M
+list_parts part_amiga "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,amiga1 $disk,amiga2 $disk,amiga3
+
+# 4 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel amiga mkpart x 0 10M mkpart x 10M 20M mkpart x 20M 30M mkpart x 30M 40M
+list_parts part_amiga "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,amiga1 $disk,amiga2 $disk,amiga3 $disk,amiga4
+
+# 5 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel amiga mkpart x 0 10M mkpart x 10M 20M mkpart x 20M 30M mkpart x 30M 40M mkpart x 40M 50M
+list_parts part_amiga "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,amiga1 $disk,amiga2 $disk,amiga3 $disk,amiga4 $disk,amiga5
+
+# 6 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel amiga mkpart x 0 10M mkpart x 10M 20M mkpart x 20M 30M mkpart x 30M 40M mkpart x 40M 50M mkpart x 50M 60M
+list_parts part_amiga "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,amiga1 $disk,amiga2 $disk,amiga3 $disk,amiga4 $disk,amiga5 $disk,amiga6
+
+# 7 parts
+create_disk_image "${imgfile}" 128
+${parted} -a none -s "${imgfile}" mklabel amiga mkpart x 0 10M mkpart x 10M 20M mkpart x 20M 30M mkpart x 30M 40M mkpart x 40M 50M mkpart x 50M 60M mkpart x 60M 70M
+list_parts part_amiga "${imgfile}" "${outfile}"
+check_output "${outfile}" $disk $disk,amiga1 $disk,amiga2 $disk,amiga3 $disk,amiga4 $disk,amiga5 $disk,amiga6 $disk,amiga7
+
index 3671300d8b882ea0a499e5fa2435ebdc166ace65..07d17b781ff380d1c67a9a77dcd9611862fee947 100644 (file)
@@ -23,9 +23,10 @@ disk=hda
 indisk=ata0
 
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # PLATFORM: Don't mess with real devices when OS is active
     *-emu)
        exit 0;;
-    # no ATA on ARC platforms (they use SCSI)
+    # PLATFORM: no ATA on ARC platforms (they use SCSI)
     *-arc)
        exit 0;;
     # FIXME: No native drivers are available for those
index ec6731c8534d63a86985ac67f20956f1bf88bd9c..3dea51c01ffb8fbd70ca8e5b9230ae87dcb8ac68 100644 (file)
@@ -20,12 +20,13 @@ grubshell=@builddir@/grub-shell
 . "@builddir@/grub-core/modinfo.sh"
 
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
+    # PLATFORM: Don't mess with real devices when OS is active
     *-emu)
        exit 0;;
     # FIXME: qemu gets bonito DMA wrong
     mipsel-loongson)
        exit 0;;
-    # no USB on ARC and qemu-mips platforms
+    # PLATFORM: no USB on ARC and qemu-mips platforms
     mips*-arc | mips*-qemu_mips)
        exit 0;;
     # FIXME: No native drivers are available for those
index 5b20ca3fb5084b5bbba809d6c39e9d700009d586..1d7dfb8689f8be4e1dc0fb4a3472ebe9e0862588 100644 (file)
@@ -103,7 +103,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
        boot=cd
        qemu=qemu-system-mips64
        qemuopts="$qemuopts -M indy"
-       console=console
+       serial_port=arc/serial0/line0
+       console=
        trim=1
        ;;
     mipsel-arc)
@@ -124,9 +125,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     mipsel-loongson)
        boot=mipsel_fulong2e
        qemu=qemu-system-mips64el
-       qemuopts="$qemuopts -no-reboot -M fulong2e"
+       qemuopts="$qemuopts -M fulong2e"
        console=
-       halt_cmd=reboot
        trim=1
        ;;
     i386-coreboot)