From: Anthony Liguori <anthony@codemonkey.ws>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] For all targets and machine types: "start to monitor" smoke test
Date: Tue, 07 Aug 2012 14:35:02 -0500 [thread overview]
Message-ID: <87fw7ya42h.fsf@codemonkey.ws> (raw)
In-Reply-To: <87obmmcxlh.fsf@blackfin.pond.sub.org>
Markus Armbruster <armbru@redhat.com> writes:
> Very basic smoke test: start QEMU with -monitor stdio, quit immediately.
> Wouldn't it be nice if that worked for all targets and machine types?
>
> Many targets have mandatory options (fun oxymoron), such as -kernel or
> -pflash. Can't stop me, I just try a bunch until something works.
>
> Many targets expect various files to be present, and some of them need
> to have the right size. Can't stop me, I hack up the file loaders until
> it works (silly patch appended). To do this right, we'd need the
> required files or suitable mock-ups in-tree.
I attempted something similar in the past and ran into similar results.
>
> Test script:
>
> #!/bin/sh
> for i in ../qemu/bld/*-softmmu/qemu-system-*
> do
> echo "= $i ="
> for m in `$i -M help | sed -n '2,$s/ .*//gp'`
> do
> echo "== $m =="
> for k in "" "-kernel /dev/null" "-pflash /dev/null" "-pflash /dev/null -pflash /dev/null -kernel /dev/null"
> do
> echo "=== ${k:-(default)} ==="
> if echo q | QEMU_AUDIO_DRV=none $i -S -vnc :0 -M $m $k -monitor stdio | fgrep -q '(qemu)'
> then break
> else false
> fi
> done
> if [ $? -eq 0 ]
> then echo "*** Success $k ***"
> else echo '*** Fail'
> fi
> done
> done
>
> Summary of results:
>
> * Bad unexplained
>
> qemu-system-arm lm3s811evb
> qemu-system-arm lm3s6965evb
> qemu-system-arm: /work/armbru/qemu/hw/qdev.c:310: qdev_get_gpio_in: Assertion `n >= 0 && n < dev->num_gpio_in' failed.
>
> qemu-system-ppc64 prep
> qemu: hardware error: Unknown device 'i82378' for bus 'PCI'
>
> qemu-system-ppcemb ref405ep
> qemu-system-ppcemb taihu
> Unable to find PowerPC 405ep CPU definition
>
> qemu-system-ppcemb mac99
> qemu-system-ppcemb g3beige
> qemu-system-ppcemb prep
> Unable to find PowerPC CPU definition
>
> qemu-system-xtensaeb lx60
> qemu-system-xtensaeb lx200
> qemu-system-xtensaeb sim
> Unable to find CPU definition
>
> I'm not saying these are all busted. If you know how to "start to
> monitor" one of these, let us know.
Perhaps we could add a QEMUMachine parameter that indicates that the
machine doesn't start without special options.
At least a handful of these machines cannot be run without the use of
non-free binaries firmware :-(
Regards,
Anthony Liguori
>
> * Not easily testable for me
>
> qemu-system-i386 xenfv
> qemu-system-i386 xenpv
> qemu-system-x86_64 xenfv
> qemu-system-x86_64 xenpv
> failed to initialize Xen: Operation not permitted
> No accelerator found!
>
> * Good
>
> qemu-system-alpha clipper
> qemu-system-arm collie nuri smdkc210 connex verdex highbank
> integratorcp kzm mainstone musicpal n800 n810 sx1 sx1-v1 cheetah
> realview-eb realview-eb-mpcore realview-pb-a8 realview-pbx-a9
> akita spitz borzoi terrier tosa versatilepb versatileab
> vexpress-a9 vexpress-a15 xilinx-zynq-a9 z2
> qemu-system-cris axis-dev88
> qemu-system-i386 pc pc-1.2 pc-1.1 pc-1.0 pc-0.15 pc-0.14 pc-0.13
> pc-0.12 pc-0.11 pc-0.10 isapc
> qemu-system-lm32 lm32-uclinux lm32-evr milkymist
> qemu-system-m68k an5206 dummy mcf5208evb
> qemu-system-microblaze petalogix-ml605 petalogix-s3adsp1800
> qemu-system-microblazeel petalogix-ml605 petalogix-s3adsp1800
> qemu-system-mips magnum pica61 malta mipssim mips
> qemu-system-mips64 magnum pica61 malta mipssim mips
> qemu-system-mips64el fulong2e magnum pica61 malta mipssim mips
> qemu-system-mipsel magnum pica61 malta mipssim mips
> qemu-system-or32 or32-sim
> qemu-system-ppc ref405ep taihu bamboo mac99 g3beige prep virtex-ml507
> qemu-system-ppc64 ref405ep taihu bamboo mac99 g3beige virtex-ml507
> qemu-system-ppcemb bamboo virtex-ml507
> qemu-system-s390x s390 s390-virtio
> qemu-system-sh4 r2d shix
> qemu-system-sh4eb r2d shix
> qemu-system-sparc leon3_generic SS-5 SS-10 SS-600MP SS-20 Voyager LX
> SS-4 SPARCClassic SPARCbook SS-1000 SS-2000 SS-2
> qemu-system-sparc64 sun4u sun4v Niagara
> qemu-system-x86_64 pc pc-1.2 pc-1.1 pc-1.0 pc-0.15 pc-0.14 pc-0.13
> pc-0.12 pc-0.11 pc-0.10 isapc
> qemu-system-xtensa lx60 lx200 sim
>
>
> diff --git a/hw/loader.c b/hw/loader.c
> index 33acc2f..e23af6c 100644
> --- a/hw/loader.c
> +++ b/hw/loader.c
> @@ -62,7 +62,7 @@ int get_image_size(const char *filename)
> int fd, size;
> fd = open(filename, O_RDONLY | O_BINARY);
> if (fd < 0)
> - return -1;
> + return 0;//-1;
> size = lseek(fd, 0, SEEK_END);
> close(fd);
> return size;
> @@ -75,7 +75,7 @@ int load_image(const char *filename, uint8_t *addr)
> int fd, size;
> fd = open(filename, O_RDONLY | O_BINARY);
> if (fd < 0)
> - return -1;
> + return 0;//-1;
> size = lseek(fd, 0, SEEK_END);
> lseek(fd, 0, SEEK_SET);
> if (read(fd, addr, size) != size) {
> @@ -108,6 +108,7 @@ int load_image_targphys(const char *filename,
> int size;
>
> size = get_image_size(filename);
> + if (size < 0) size = 0;
> if (size > max_sz) {
> return -1;
> }
> @@ -293,7 +294,7 @@ int load_elf(const char *filename, uint64_t (*translate_fn)(void *, uint64_t),
> fd = open(filename, O_RDONLY | O_BINARY);
> if (fd < 0) {
> perror(filename);
> - return -1;
> + return 0;//-1;
> }
> if (read(fd, e_ident, sizeof(e_ident)) != sizeof(e_ident))
> goto fail;
> @@ -332,7 +333,7 @@ int load_elf(const char *filename, uint64_t (*translate_fn)(void *, uint64_t),
>
> fail:
> close(fd);
> - return -1;
> + return 0;//-1;
> }
>
> static void bswap_uboot_header(uboot_image_header_t *hdr)
> diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c
> index d1c7423..f4c20dd 100644
> --- a/hw/pflash_cfi01.c
> +++ b/hw/pflash_cfi01.c
> @@ -609,7 +609,7 @@ pflash_t *pflash_cfi01_register(target_phys_addr_t base,
> pfl->storage = memory_region_get_ram_ptr(&pfl->mem);
> memory_region_add_subregion(get_system_memory(), base, &pfl->mem);
>
> - pfl->bs = bs;
> + pfl->bs = NULL;//bs;
> if (pfl->bs) {
> /* read the initial flash content */
> ret = bdrv_read(pfl->bs, 0, pfl->storage, total_len >> 9);
> diff --git a/vl.c b/vl.c
> index 9fea320..bcba96d 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1814,6 +1814,7 @@ char *qemu_find_file(int type, const char *name)
> snprintf(buf, len, "%s/%s%s", data_dir, subdir, name);
> if (access(buf, R_OK)) {
> g_free(buf);
> + return g_strdup("/dev/null");
> return NULL;
> }
> return buf;
next prev parent reply other threads:[~2012-08-07 19:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 19:26 [Qemu-devel] For all targets and machine types: "start to monitor" smoke test Markus Armbruster
2012-08-07 19:35 ` Anthony Liguori [this message]
2012-08-07 19:55 ` Markus Armbruster
2012-08-07 20:05 ` Peter Maydell
2012-08-07 20:30 ` Markus Armbruster
2012-08-07 20:37 ` Eric Blake
2012-08-08 7:50 ` Markus Armbruster
2012-08-08 8:03 ` Peter Maydell
2012-08-08 8:29 ` Markus Armbruster
2012-08-07 19:42 ` Peter Maydell
2012-08-08 7:22 ` Markus Armbruster
2012-08-10 1:29 ` Peter Crosthwaite
2012-08-07 20:34 ` Andreas Färber
2012-08-08 7:27 ` Markus Armbruster
2012-08-08 12:22 ` Markus Armbruster
2012-08-07 21:06 ` Blue Swirl
2012-08-08 7:39 ` Markus Armbruster
2012-08-08 19:34 ` Blue Swirl
2012-08-08 7:38 ` Max Filippov
2012-08-08 8:31 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fw7ya42h.fsf@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.