Re: [PATCH v6 02/13] t: import the clar unit testing framework

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

 



On Wed, Aug 28, 2024 at 02:16:52PM +0100, Phillip Wood wrote:
> Hi Patrick
> 
> On 20/08/2024 15:02, Patrick Steinhardt wrote:
> > Import the clar unit testing framework at commit 1516124 (Merge pull
> > request #97 from pks-t/pks-whitespace-fixes, 2024-08-15). The framework
> > will be wired up in subsequent commits.
> 
> I would be good to explain why we're doing this so we have a record in the
> project history. A summary of the advantages and disadvantages of using clar
> vs our current unit test framework would be helpful as well.

Will do.

> > diff --git a/t/unit-tests/clar/clar.c b/t/unit-tests/clar/clar.c
> > [...]
> > +static void
> > +clar_parse_args(int argc, char **argv)
> > +{
> > [...]
> > +		case 'q':
> > +			_clar.report_errors_only = 1;
> > +			break;
> 
> I think this option is incompatible with TAP output as when TAP output is
> selected the first error is printed as part of clar_print_ontest() and
> clar_print_errors() is a no-op. We should error out if it is given with '-t'

Yup. I'll address this by implementing our own option parsing.

The remainder of your concerns relate to the clar implementation itself,
and as such I won't yet address them. I'll work with upstream to get
these fixed after this series lands though, as outlined in [1].

[1]: <ZsSTOczuGhT5zwoV@tanuki>

Patrick




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux