[gnutls-devel] GnuTLS | Use faketime instead of datefudge (!1716)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sun Mar 19 07:43:32 CET 2023




Andreas Metzler commented on a discussion on tests/scripts/gnutls_timewrapper: https://gitlab.com/gnutls/gnutls/-/merge_requests/1716#note_1319729206

> +#!/bin/sh
> +
> +set -e
> +
> +if test -z "${GNUTLS_TIMEWRAPPER_CMD}" ; then

@dueno wrote
> How about turning this script into a shell function in common.sh and exit the caller when any error happened? Then we could also omit skip_if_no_timewrapper calls.

I have since realized that we cannot completely get rid of `skip_if_no_timewrapper`. Doing "exit 77" in the actual wrapper script does not work for some shell construct used in the testsuite, e.g.:
- timewrapped background processes (`launch_bare_server gnutls_timewrapper_standalone "${TESTDATE}" openssl ...`)
- Pipe constructs ( `gnutls_timewrapper_standalone "2006-09-23" "${CERTTOOL}"  ... | tee $TMPFILE1 ...`)
In these cases the timewrapped command is executed in a subshell and the exit 77 there cannot cause a test SKIP.

So I will reintroduce skip_if_no_timewrapper, do the datefudge/faketime selection there and make previous invocation a hard requirement in the wrapper.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1716#note_1319729206
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20230319/4ccc7edf/attachment.html>


More information about the Gnutls-devel mailing list