Re: [PATCH] kunit: update NULL vs IS_ERR() tests

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

 



On Fri, Oct 14, 2022 at 2:37 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> The alloc_string_stream() functions were changed from returning NULL on
> error to returning error pointers so these caller needs to be updated
> as well.
>
> Fixes: 78b1c6584fce ("kunit: string-stream: Simplify resource use")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Reviewed-by: Daniel Latypov <dlatypov@xxxxxxxxxx>

Thanks for catching this.
This patch seems like it updates the only (direct) callsite for each
of the funcs, so I think we're good once it goes in.

I also tested alloc_string_stream() failing, and the output looks good:
Could not allocate stream to print failed assertion in
lib/kunit/kunit-example-test.c:29
...
---[ end trace 0000000000000000 ]---
    not ok 1 - example_simple_test
    # example_skip_test: initializing
    # example_skip_test: You should not see a line below.



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux