All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [BUG] test/test-main.c does not compile on non-sandbox
Date: Sun, 28 Mar 2021 06:54:40 +1300	[thread overview]
Message-ID: <CAPnjgZ0tuxy6UWr1odrHuc53TLFyvzZTe2DuT_vUtHAFzBzL_Q@mail.gmail.com> (raw)
In-Reply-To: <3ece157a-0be4-94af-512f-179de56a539d@gmx.de>

Hi Heinrich,

On Sun, 28 Mar 2021 at 00:10, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Hello Simon,
>
> commit
>
>    c79705ea938e ("test: Move dm_test_init() into test-main.c")
>
> merged into origin/next breaks compiling qemu-riscv64_defconfig with
> CONFIG_UNIT_TEST=y:
>
> test/test-main.c:10:10: fatal error: asm/state.h: No such file or directory
>     10 | #include <asm/state.h>
>        |          ^~~~~~~~~~~~~
> compilation terminated.
>
> Could you, please, provide a fix and set CONFIG_UNIT_TEST=y for some
> QEMU boards so that we avoid such errors in future.

Please see:

http://patchwork.ozlabs.org/project/uboot/patch/20210324214434.46584-2-sjg at chromium.org/

I enabled it on snow, which is a real board, to help prevent this in future.

>
> Please, also fix test/cmd/setexpr.c not compiling on non-sandbox leading
> to an additional build error.

I will send another patch for what I think you see there. But I also
see this warning which I could not figure out.

In file included from test/cmd/setexpr.c:14:
test/cmd/setexpr.c: In function 'setexpr_test_sub':
include/test/ut.h:156:3: warning: '%s' directive argument is null
[-Wformat-overflow=]
  156 |   ut_failf(uts, __FILE__, __LINE__, __func__,  \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  157 |     #expr1 " = " #expr2,    \
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~
  158 |     "Expected \"%s\", got \"%s\"", _val1, _val2); \
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/cmd/setexpr.c:229:2: note: in expansion of macro 'ut_asserteq_str'
  229 |  ut_asserteq_str("thus it is longer us it is longer a test", buf);
      |  ^~~~~~~~~~~~~~~
include/test/ut.h:158:29: note: format string is defined here
  158 |     "Expected \"%s\", got \"%s\"", _val1, _val2); \
      |

Regards,
Simon

      reply	other threads:[~2021-03-27 17:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-27 11:10 [BUG] test/test-main.c does not compile on non-sandbox Heinrich Schuchardt
2021-03-27 17:54 ` Simon Glass [this message]

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=CAPnjgZ0tuxy6UWr1odrHuc53TLFyvzZTe2DuT_vUtHAFzBzL_Q@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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.