qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL v4 01/12] lm32_sys: increase test case name lengt


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL v4 01/12] lm32_sys: increase test case name length limit
Date: Sat, 1 Feb 2014 17:39:16 +0000

On 20 January 2014 19:34, Michael Walle <address@hidden> wrote:
> The new MMU tests use longer names.
>
> Signed-off-by: Michael Walle <address@hidden>
> ---
>  hw/misc/lm32_sys.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/misc/lm32_sys.c b/hw/misc/lm32_sys.c
> index 9bdb781..8176cdb 100644
> --- a/hw/misc/lm32_sys.c
> +++ b/hw/misc/lm32_sys.c
> @@ -42,7 +42,7 @@ enum {
>      R_MAX
>  };
>
> -#define MAX_TESTNAME_LEN 16
> +#define MAX_TESTNAME_LEN 32
>
>  #define TYPE_LM32_SYS "lm32-sys"
>  #define LM32_SYS(obj) OBJECT_CHECK(LM32SysState, (obj), TYPE_LM32_SYS)
> @@ -80,7 +80,7 @@ static void sys_write(void *opaque, hwaddr addr,
>      case R_PASSFAIL:
>          s->regs[addr] = value;
>          testname = (char *)s->testname;
> -        qemu_log("TC  %-16s %s\n", testname, (value) ? "FAILED" : "OK");
> +        qemu_log("TC  %-32s %s\n", testname, (value) ? "FAILED" : "OK");

You could avoid the duplication of the 32 here by using
    qemu_log("TCG %-*s %s\n", MAX_TESTNAME_LEN, testname, value ?
"FAILED" : "OK");

thanks
-- PMM



reply via email to

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