run-checker NO DGRAM and test cases
Tomas Mraz
tomas at openssl.org
Thu Mar 17 16:54:32 UTC 2022
On Thu, 2022-03-17 at 10:17 -0400, Michael Richardson wrote:
>
> Tomas Mraz <tomas at openssl.org> 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
More information about the openssl-users
mailing list