From bb010bfc595c07ea684b53521832aa88fe476d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sat, 1 Sep 2018 10:38:00 +0200 Subject: [PATCH 1/4] debug sikuli installation error --- utils/install-sikulix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/install-sikulix.sh b/utils/install-sikulix.sh index 4156332..5e530a3 100755 --- a/utils/install-sikulix.sh +++ b/utils/install-sikulix.sh @@ -5,5 +5,5 @@ set -e # The sikuli-ide packaged with ubuntu 16.04 does not seem to work correctly: missing dependencies, some dependencies are too recent, … mkdir ~/sikulix/ wget https://launchpad.net/sikuli/sikulix/1.1.3/+download/sikulixsetup-1.1.3.jar -O ~/sikulix/sikulixsetup-1.1.3.jar -(cd ~/sikulix && java -jar sikulixsetup-1.1.3.jar options 1 1.1) +(cd ~/sikulix && java -jar sikulixsetup-1.1.3.jar options 1 1.1) || (cat ~/sikulix/SikuliX-1.1.3-SetupLog.txt; exit 1) echo 'export PATH="$HOME/sikulix/:$PATH"' From b41df179569289f26b17e2bca130660777976d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Mon, 24 Sep 2018 09:24:12 +0200 Subject: [PATCH 2/4] make -j 10 sometimes fails to mount the resulting ISO9660 filesystem, added more information and a dump of the OS binary to help debug the issue --- Makefile | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9d8ea1a..bb28512 100644 --- a/Makefile +++ b/Makefile @@ -511,6 +511,19 @@ test/requiring_sudo: ${tests_requiring_sudo:test/%=${bld}/test_pass/sudo_%} ${bl # check that the fat filesystem can be mounted and has the correct contents ${bld}/test_pass/sudo_fat12_mount: ${os_filename} ${dep_bytes_fat12_start} ${bld}/check_makefile | ${bld}/mnt_fat12 sudo umount ${bld}/mnt_fat12 || true + # debug failure to mount the FAT12 filesystem + (set -x ;\ + grep '^' ${bld}/offsets/* ;\ + (sudo mount -o loop,ro,offset=${bytes_fat12_start} $< ${bld}/mnt_fat12) || true ;\ + dmesg | tail ;\ + ls -l ${bld}/mnt_fat12 | (grep os.zip || true) ;\ + sudo umount ${bld}/mnt_fat12 || true ;\ + sleep 10 ;\ + cat ${os_filename} | xz | base64 ;\ + (sudo mount -o loop,ro,offset=${bytes_fat12_start} $< ${bld}/mnt_fat12) || true ;\ + sudo umount ${bld}/mnt_fat12 || true ;\ + ) > debug-fat12.log 2>&1 + cat debug-fat12.log sudo mount -o loop,ro,offset=${bytes_fat12_start} $< ${bld}/mnt_fat12 ls -l ${bld}/mnt_fat12 | grep os.zip sudo umount ${bld}/mnt_fat12 @@ -518,12 +531,19 @@ ${bld}/test_pass/sudo_fat12_mount: ${os_filename} ${dep_bytes_fat12_start} ${bld ${bld}/test_pass/sudo_iso_mount: ${os_filename} ${bld}/check_makefile | ${bld}/mnt_iso sudo umount ${bld}/mnt_iso || true - grep '^' ${bld}/offsets/* # debug failure to mount the ISO9660 filesystem - (sudo mount -o loop,ro $< ${bld}/mnt_iso) || true - dmesg | tail # debug failure to mount the ISO9660 filesystem - hexdump -C ${os_filename} - ls -l ${bld}/mnt_iso | grep os.zip - sudo umount ${bld}/mnt_iso + # debug failure to mount the ISO9660 filesystem + (set -x ;\ + grep '^' ${bld}/offsets/* ;\ + (sudo mount -o loop,ro $< ${bld}/mnt_iso) || true ;\ + dmesg | tail ;\ + cat ${os_filename} | xz | base64 ;\ + ls -l ${bld}/mnt_iso | grep os.zip ;\ + sudo umount ${bld}/mnt_iso || true ;\ + sleep 11 ;\ + (sudo mount -o loop,ro $< ${bld}/mnt_iso) || true ;\ + sudo umount ${bld}/mnt_iso || true ;\ + ) > debug-iso.log 2>&1 + cat debug-iso.log sudo mount -o loop,ro $< ${bld}/mnt_iso sudo umount ${bld}/mnt_iso touch $@ From 311c8ef28914de684e770836f3b4a7ed4333ec61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Mon, 24 Sep 2018 09:35:12 +0200 Subject: [PATCH 3/4] Fixed dependency in Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bb28512..834d5c2 100644 --- a/Makefile +++ b/Makefile @@ -213,7 +213,7 @@ ${bld}/os.32k: example-os/os.asm ${bld}/check_makefile nasm -w+macro-params -w+macro-selfref -w+orphan-labels -w+gnu-elf-extensions -o $@ $< # Circumvent the fact that faketime does not work on system binaries in macos -./utils/mkisofs ./utils/mformat ./utils/mcopy: Makefile # TODO: depend on the mkisofs binary +./utils/mkisofs ./utils/mformat ./utils/mcopy: ${bld}/check_makefile # TODO: depend on the mkisofs binary cp $$(which $$(basename $@)) $@ chmod u+x $@ From 0b037fd2e6d5599e32858699fd214191156d7866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Mon, 24 Sep 2018 09:38:57 +0200 Subject: [PATCH 4/4] Tests should fail if the OS filename argument is missing. --- test/bochs.sh | 1 + test/dosbox.sh | 1 + test/gui-sh-mac.sh | 1 + test/gui-sh.sh | 1 + test/qemu-system-i386-cdrom.sh | 1 + test/qemu-system-i386-floppy.sh | 1 + test/virtualbox.sh | 1 + 7 files changed, 7 insertions(+) diff --git a/test/bochs.sh b/test/bochs.sh index 9ddebcd..cfbcb27 100755 --- a/test/bochs.sh +++ b/test/bochs.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi os_filename="$1" diff --git a/test/dosbox.sh b/test/dosbox.sh index 9f5571d..767802d 100755 --- a/test/dosbox.sh +++ b/test/dosbox.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi os_filename="$1" diff --git a/test/gui-sh-mac.sh b/test/gui-sh-mac.sh index 7659996..e9f12b8 100755 --- a/test/gui-sh-mac.sh +++ b/test/gui-sh-mac.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi # Force the path to be relative or absolute, but with at least one / # Otherwise, the command will be searched in the $PATH, instead of using the diff --git a/test/gui-sh.sh b/test/gui-sh.sh index 8326c52..5fc2480 100755 --- a/test/gui-sh.sh +++ b/test/gui-sh.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi # Force the path to be relative or absolute, but with at least one / # Otherwise, the command will be searched in the $PATH, instead of using the diff --git a/test/qemu-system-i386-cdrom.sh b/test/qemu-system-i386-cdrom.sh index 0ac9ea4..e412b87 100755 --- a/test/qemu-system-i386-cdrom.sh +++ b/test/qemu-system-i386-cdrom.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi os_filename="$1" diff --git a/test/qemu-system-i386-floppy.sh b/test/qemu-system-i386-floppy.sh index 9b0e7b6..fd57cdf 100755 --- a/test/qemu-system-i386-floppy.sh +++ b/test/qemu-system-i386-floppy.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi os_filename="$1" diff --git a/test/virtualbox.sh b/test/virtualbox.sh index db152f8..73f6020 100755 --- a/test/virtualbox.sh +++ b/test/virtualbox.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi os_filename="$1"