[PATCH v3 09/23] test: log: Convert log_test from python to C

Simon Glass sjg at chromium.org
Tue Nov 3 16:11:45 CET 2020


On Sat, 17 Oct 2020 at 12:08, Sean Anderson <seanga2 at gmail.com> wrote:
>
> When rebasing this series I had to renumber all my log tests because
> someone made another log test in the meantime. This involved updaing a
> number in several places (C and python), and it wasn't checked by the
> compiler. So I though "how hard could it be to just rewrite in C?" And
> though it wasn't hard, it *was* tedious. Tests are numbered the same as
> before to allow for easier review.
>
> A note that if a test fails, everything after it will probably also fail.
> This is because that test won't clean up its filters.  There's no easy way
> to do the cleanup, except perhaps removing all filters in a wrapper
> function.
>
> Signed-off-by: Sean Anderson <seanga2 at gmail.com>
> ---
>
> Changes in v3:
> - New
>
>  cmd/log.c                 |   6 -
>  include/test/log.h        |   2 +
>  test/log/log_test.c       | 446 ++++++++++++++++++++++----------------
>  test/log/syslog_test.h    |   2 -
>  test/py/tests/test_log.py | 104 ---------
>  5 files changed, 260 insertions(+), 300 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list