]> granicus.if.org Git - strace/commitdiff
qemu_multiarch_testing: update
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 15 Jan 2015 17:01:32 +0000 (17:01 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 16 Jan 2015 16:26:40 +0000 (16:26 +0000)
* qemu_multiarch_testing/.gitignore: New file.
* qemu_multiarch_testing/README: Update statistics.
* qemu_multiarch_testing/hdc.dir/init2: Run "make check".
* qemu_multiarch_testing/make-hdc-img.sh: Robustify,
automatically calculate hdc image size.
* qemu_multiarch_testing/parallel-build-hdc-img.sh: Reduce
hdb image size.  Report completion of each parallelized task.

qemu_multiarch_testing/.gitignore [new file with mode: 0644]
qemu_multiarch_testing/README
qemu_multiarch_testing/hdc.dir/init2
qemu_multiarch_testing/make-hdc-img.sh
qemu_multiarch_testing/parallel-build-hdc-img.sh

diff --git a/qemu_multiarch_testing/.gitignore b/qemu_multiarch_testing/.gitignore
new file mode 100644 (file)
index 0000000..9ba3a0a
--- /dev/null
@@ -0,0 +1,2 @@
+hdc.dir/strace
+hdc.img
index 756da24e57733615236b03360b801aa6124bdffc..271c461501873a8b824835326ef378f251b21945 100644 (file)
@@ -21,31 +21,21 @@ This runs a strace build in several qemu virtual machines in parallel.
 There is no automated detection of errors for now: you need to examine
 logs yourself.
 
-For me, the following system images worked:
-system-image-armv4l
-system-image-armv4tl
-system-image-armv5l
-system-image-armv6l
-system-image-i686 (had to s/qemu-system-i386/qemu/ in run-emulator.sh)
-system-image-mipsel
-system-image-mips
-system-image-x86_64
-system-image-sparc   - needed small edit in native-build.sh:
-    # Getting this early:
-    #       Unhandled Exception 0x00000007
-    #       PC = 0xffd07cec NPC = 0xffd07cf0
-    #       Stopping execution
-    # and it looks like it's triggered just by too long kernel cmdline,
-    # not by specific options.
-    #export KERNEL_EXTRA="FTP_SERVER=$FTP_SERVER FTP_PORT=$FTP_PORT NATIVE_BUILD=$NATIVE_BUILD $KERNEL_EXTRA"
-    # This works:
-    export KERNEL_EXTRA="NATIVE_BUILD=$NATIVE_BUILD $KERNEL_EXTRA"
+For me, the following system images worked (tests passed/skipped/failed):
+system-image-armv4l  - 14/14/1 (failed: stat32-v.test - wrong stat decoding)
+system-image-armv4tl - 15/14/0
+system-image-armv5l  - 15/14/0
+system-image-armv6l  - 15/14/0
+system-image-i486    - 14/14/1 (failed: count.test - grep segfault)
+system-image-i586    - 14/14/1 (failed: count.test - grep segfault)
+system-image-i686    - 14/14/1 (failed: count.test - grep segfault)
+system-image-mips    - 15/14/0
+system-image-mipsel  - 15/14/0
+system-image-powerpc - 13/14/2 (failed: ptrace_setoptions.test - grep segfault, ipc_sem.test - ipc_sem segfault)
+system-image-sparc   - 13/14/2 (failed: ipc_sem.test - ipc_sem segfault, sigaction.test - wrong rt_sigaction decoding)
+system-image-x86_64  - 14/15/0
 
 And these did not:
-system-image-armv4eb - VFS: Cannot open root device "sda" or unknown-block(0,0)
-system-image-m68k    - run-emulator.sh has no call of qemu-system-* (not supported yet??)
-system-image-mips64  -
-       need to run ./native-build.sh ../hdc.img by hand;
-       copying in /mnt/init fails (segv?)
-system-image-powerpc - QEMU stuck very early
+system-image-m68k    - qemu-system-m68k: -M q800: Unsupported machine type
+system-image-mips64  - init dies before reaching /mnt/init
 system-image-sh4     - hdc does not mount (no support for 2 disks)
index f1a9dee4721f32038538a72adede603a0a20af13..8c0200afcb85db3954868731e085f97e562cfb03 100755 (executable)
@@ -1,19 +1,16 @@
 #!/bin/sh
 
 umount /mnt # optional
-echo "Building"
 (
-       cd strace &&
-       ./configure &&
-       make &&
-       echo "Build: SUCCESS"
+       set -e -x
+       cd strace
+       ./configure
+       make
        size strace
-       ./strace
-       # strace may segfault, let's see exit code
-       echo "Exit code: $?"
-       ./strace /bin/true
-       echo "Exit code: $?"
-       ftpput -P "$FTP_PORT" "$FTP_SERVER" strace
+       make check VERBOSE=1 &&
+               cat tests/test-suite.log ||:
+       test "x$FTP_PORT" = x ||
+               ftpput -P "$FTP_PORT" "$FTP_SERVER" strace
 ) 2>&1 | tee strace_build.log
 mount -o remount,ro /home
 sync
index 93d2a77b04dbba82f3beebd961867d01a424678e..3c35f4eadb6dda90519e53f17ab00f0957ef03e7 100755 (executable)
@@ -1,17 +1,30 @@
-#!/bin/sh
+#!/bin/sh -ex
 
-export HDCMEGS=128
+mountpoint -q /
+[ ! -e hdc.img.dir ]
 
-rm hdc.img 2>/dev/null
-umount -d hdc.img.dir 2>/dev/null
-rm -rf hdc.img.dir 2>/dev/null
+cleanup()
+{
+       trap - EXIT
+       if mountpoint -q hdc.img.dir; then
+               umount -d hdc.img.dir
+       fi
+       mountpoint -q hdc.img.dir ||
+               rm -rf hdc.img.dir
+       exit $@
+}
 
-dd if=/dev/zero of=hdc.img bs=1024 seek=$((HDCMEGS*1024-1)) count=1 &&
-mke2fs -q -b 1024 -F -i 4096 hdc.img &&
-tune2fs -j -c 0 -i 0 hdc.img &&
-mkdir hdc.img.dir &&
-mount -o loop hdc.img hdc.img.dir &&
-cp -a hdc.dir/* hdc.img.dir &&
-umount -d hdc.img.dir &&
-rm -rf hdc.img.dir &&
-true
+trap 'cleanup $?' EXIT
+trap 'cleanup 1' HUP PIPE INT QUIT TERM
+
+size=$(du -ks hdc.dir | sed -rn 's/^([0-9]+).*/\1/p')
+[ "$size" -gt 0 ]
+
+rm -f hdc.img
+dd if=/dev/zero of=hdc.img count=1 bs=1024 seek=$(($size*2))
+mkfs.ext3 -q -F -b 1024 -i 4096 hdc.img
+tune2fs -c 0 -i 0 hdc.img
+mkdir hdc.img.dir
+mount -o loop hdc.img hdc.img.dir
+cp -a hdc.dir/* hdc.img.dir/
+umount -d hdc.img.dir
index cbfe42fbb311d8a8e3a11c2a7373cc178303d483..d98f954c460f0bc0c549eda527603396f31ac969 100755 (executable)
@@ -1,13 +1,14 @@
 #!/bin/sh
 
-export HDBMEGS=128
+export HDBMEGS=64
 
 build_in_dir()
 {
        cd "$1" || exit 1
-       rm -f hdb.img 2>/dev/null
-       nice -n10 ./native-build.sh ../hdc.img
-       rm -f hdb.img 2>/dev/null
+       rm -f hdb.img
+       nice -n10 time ./native-build.sh ../hdc.img
+       rm -f hdb.img
+       echo >&3 "Finished: $1"
 }
 
 started=false
@@ -15,7 +16,7 @@ for dir; do
        test -d "$dir" || continue
        test -e "$dir/native-build.sh" || continue
        echo "Starting: $dir"
-       build_in_dir "$dir" </dev/null >"$dir.log" 2>&1 &
+       build_in_dir "$dir" 3>&1 </dev/null >"$dir.log" 2>&1 &
        started=true
 done