Re: run-checker NO DGRAM and test cases

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

 



On Thu, 2022-03-17 at 10:17 -0400, Michael Richardson wrote:
> 
> Tomas Mraz <tomas@xxxxxxxxxxx> wrote:
>     >> I figured out that this means that ./Configure should have
> "no-dgram"
>     >> appended to it.  That seems to result in OPENSSL_NO_DGRAM
> being
>     >> defined.
>     >>
>     >> My test case naturally does not compile for that.
>     >>
>     >> Should my test case just be surrounded by #ifndef
> OPENSSL_NO_DGRAM
>     >> from top to bottom (leaving...?), or is there something more
>     >> sophisticated that should go into build.info in order to skip
> the test
>     >> in that configuration?
> 
>     > Please look at the other examples in tests/build.info - there
> are
>     > things disabled for no-sock and other stuff. But you'll also
> need to
>     > skip the test in the perl test recipe.
> 
> I thought it was shell script, but now that I look more at it, I
> guess it is
> a custom DSL.
> 
>   IF[{- !$disabled{dgram} -}]
>         PROGRAMS{noinst}=bio_write_test
>   ENDIF
>   SOURCE[bio_write_test]=bio_write_test.c
>   INCLUDE[bio_write_test]=../include ../apps/include
>   DEPEND[bio_write_test]=../libcrypto libtestutil.a
> 
> Should I repeat the test for the two programs, or should I group into
> a
> single IF for both programs?
> 
> i.e.
>   IF[{- !$disabled{dgram} -}]
>         PROGRAMS{noinst}=bio_write_test bio_read_test
>   ENDIF

Grouping them is fine.

> I guess maybe the tests could be named with dgram in the file name,
> since that's all they do. 

I guess that we could later add more testcases there for other
bio_write/bio_read functions? Of course then we would have to switch
from disabling them in build.info to ifdefs.

>  Should the test *ALSO* ifdef itself out if
> OPENSSL_NO_DGRAM is defined?

No, that's not necessary as they won't be built at all with the
build.info change above.

> It already does:
> 
> #if defined(_WIN32)
> int setup_tests(void)
> {
>     return 1;
> }
> ...
> 
> 

-- 
Tomáš Mráz, OpenSSL





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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux