Re: [PATCH v5 02/11] of: Add test managed wrappers for of_overlay_apply()/of_node_put()

From: Stephen Boyd
Date: Tue Jul 02 2024 - 18:39:41 EST


Quoting David Gow (2024-06-13 00:48:54)
>
> This looks good to me.
>
> I was a little confused at first by some of the wrapper names: in
> particular that of_overlay_fdt_apply_kunit() is applying the overlay
> immediately, and deferring a cleanup action, but of_node_put_kunit()
> is not doing anything immediately, and deferring the put action. My
> feeling is that the ideal thing would be to have wrappers for all of
> the of_* functions which return a node which needs to be 'put', and
> have those wrappers add an of_node_put() action. You could then have
> of_node_put_kunit() provide a way to trigger that action early. But
> that seems like it'd be a lot of work and generate a lot of wrappers
> we otherwise wouldn't need, so this seems an okay compromise to be
> able to keep using the existing of_ functions. The documentation /
> comments help make this more clear, too.
>
> So, no actual problems. (Assuming you don't want to put the
> documentation under the devicetree rather than under KUnit -- it can
> go either way.)
>
> Reviewed-by: David Gow <davidgow@xxxxxxxxxx>
>

Thanks. I'll just leave this alone as I feel like the kunit postfix
means "do stuff when test is done".