[gnutls-devel] GnuTLS | Make some tests more portable (!819)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Sun Dec 16 21:44:38 CET 2018


Tim Rühsen commented on a discussion on tests/cert-tests/certtool:

>  		exit 1
>  	fi
>  
> -	#check whether ask-pass is being honoured
> -	${SETSID} "${CERTTOOL}" --generate-self-signed --load-privkey ${TMPFILE1} --template "${srcdir}/templates/template-test.tmpl" --ask-pass >${TMPFILE2} 2>&1 <<<${PASS}
> -	if test $? != 0;then
> -		cat ${TMPFILE2}
> -		echo "cert generation failed"
> -		exit 1
> +	#check whether password is being honoured
> +	${SETSID} "${CERTTOOL}" --generate-self-signed --load-privkey ${TMPFILE1} --template ${srcdir}/templates/template-test.tmpl --ask-pass >${TMPFILE2} 2>&1 <<EOF
> +$PASS
> +EOF
> +	if test $? != 0; then

Another solution would be to check for the current shell in runtime. If the script is not run by bash or dash, we return 77 (SKIP). Maybe we can even check if `<<EOF` works or not. I have to check this out.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/819#note_125353052
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/20181216/4b2442ad/attachment.html>


More information about the Gnutls-devel mailing list