qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] For all targets and machine types: "start to monitor" s


From: Blue Swirl
Subject: Re: [Qemu-devel] For all targets and machine types: "start to monitor" smoke test
Date: Tue, 7 Aug 2012 21:06:12 +0000

On Tue, Aug 7, 2012 at 7:26 PM, Markus Armbruster <address@hidden> wrote:
> 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.
>

Funny, I tried pretty similar stuff earlier but with qtest:
http://lists.nongnu.org/archive/html/qemu-devel/2012-04/msg01880.html

> 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.
>
> 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.
>
> * 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;
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]