mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
[9.20] chg: ci: Run unit tests with PKCS#11-aware OpenSSL
Closes isc-projects/bind9#4958 Closes isc-projects/bind9#4957 Backport of MR !9543 Merge branch 'backport-mnowak/pkcs11-aware-unit-gcc-ossl3-amd64-9.20' into 'bind-9.20' See merge request isc-projects/bind9!12099
This commit is contained in:
commit
639946b38c
4 changed files with 16 additions and 0 deletions
|
|
@ -1521,6 +1521,10 @@ system:gcc:ossl3:trixie:amd64:
|
|||
artifacts: true
|
||||
|
||||
unit:gcc:ossl3:amd64:
|
||||
# Set up environment variables to run unit tests with PKCS#11-aware OpenSSL
|
||||
variables:
|
||||
OPENSSL_CONF: "/var/tmp/etc/openssl-provider.cnf"
|
||||
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
|
||||
<<: *debian_trixie_amd64_image
|
||||
<<: *unit_test_job
|
||||
needs:
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
|
|
@ -61,6 +62,7 @@ setup(void **state) {
|
|||
* the testdata was originally generated.
|
||||
*/
|
||||
setenv("TZ", "PDT8", 1);
|
||||
tzset();
|
||||
|
||||
setup_loopmgr(state);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ setup_test(void **state) {
|
|||
UNUSED(state);
|
||||
|
||||
setenv("TZ", "", 1);
|
||||
tzset();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#define UNIT_TESTING
|
||||
#include <cmocka.h>
|
||||
|
|
@ -144,6 +145,7 @@ ISC_RUN_TEST_IMPL(isc_time_parsehttptimestamp_test) {
|
|||
UNUSED(state);
|
||||
|
||||
setenv("TZ", "America/Los_Angeles", 1);
|
||||
tzset();
|
||||
t = isc_time_now();
|
||||
|
||||
isc_time_formathttptimestamp(&t, buf, sizeof(buf));
|
||||
|
|
@ -161,6 +163,7 @@ ISC_RUN_TEST_IMPL(isc_time_formatISO8601_test) {
|
|||
UNUSED(state);
|
||||
|
||||
setenv("TZ", "America/Los_Angeles", 1);
|
||||
tzset();
|
||||
t = isc_time_now();
|
||||
|
||||
/* check formatting: yyyy-mm-ddThh:mm:ssZ */
|
||||
|
|
@ -195,6 +198,7 @@ ISC_RUN_TEST_IMPL(isc_time_formatISO8601ms_test) {
|
|||
UNUSED(state);
|
||||
|
||||
setenv("TZ", "America/Los_Angeles", 1);
|
||||
tzset();
|
||||
t = isc_time_now();
|
||||
|
||||
/* check formatting: yyyy-mm-ddThh:mm:ss.sssZ */
|
||||
|
|
@ -230,6 +234,7 @@ ISC_RUN_TEST_IMPL(isc_time_formatISO8601us_test) {
|
|||
UNUSED(state);
|
||||
|
||||
setenv("TZ", "America/Los_Angeles", 1);
|
||||
tzset();
|
||||
t = isc_time_now_hires();
|
||||
|
||||
/* check formatting: yyyy-mm-ddThh:mm:ss.ssssssZ */
|
||||
|
|
@ -265,6 +270,7 @@ ISC_RUN_TEST_IMPL(isc_time_formatISO8601L_test) {
|
|||
UNUSED(state);
|
||||
|
||||
setenv("TZ", "America/Los_Angeles", 1);
|
||||
tzset();
|
||||
t = isc_time_now();
|
||||
|
||||
/* check formatting: yyyy-mm-ddThh:mm:ss */
|
||||
|
|
@ -298,6 +304,7 @@ ISC_RUN_TEST_IMPL(isc_time_formatISO8601Lms_test) {
|
|||
UNUSED(state);
|
||||
|
||||
setenv("TZ", "America/Los_Angeles", 1);
|
||||
tzset();
|
||||
t = isc_time_now();
|
||||
|
||||
/* check formatting: yyyy-mm-ddThh:mm:ss.sss */
|
||||
|
|
@ -332,6 +339,7 @@ ISC_RUN_TEST_IMPL(isc_time_formatISO8601Lus_test) {
|
|||
UNUSED(state);
|
||||
|
||||
setenv("TZ", "America/Los_Angeles", 1);
|
||||
tzset();
|
||||
t = isc_time_now_hires();
|
||||
|
||||
/* check formatting: yyyy-mm-ddThh:mm:ss.ssssss */
|
||||
|
|
@ -366,6 +374,7 @@ ISC_RUN_TEST_IMPL(isc_time_formatshorttimestamp_test) {
|
|||
UNUSED(state);
|
||||
|
||||
setenv("TZ", "America/Los_Angeles", 1);
|
||||
tzset();
|
||||
t = isc_time_now();
|
||||
|
||||
/* check formatting: yyyymmddhhmmsssss */
|
||||
|
|
|
|||
Loading…
Reference in a new issue