diff options
Diffstat (limited to 'meta/recipes-support/gnutls/gnutls')
4 files changed, 186 insertions, 4 deletions
diff --git a/meta/recipes-support/gnutls/gnutls/0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch b/meta/recipes-support/gnutls/gnutls/0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch new file mode 100644 index 0000000000..2dccea7859 --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls/0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From c4f6cb380471b5e5478ae6f7f8c5604a6a64ec1c Mon Sep 17 00:00:00 2001 | ||
2 | From: Lei Maohui <leimaohui@fujitsu.com> | ||
3 | Date: Mon, 23 May 2022 10:44:43 +0900 | ||
4 | Subject: [PATCH] Creating .hmac file should be excuted in target environment, | ||
5 | so deleted it from build process. | ||
6 | |||
7 | Upstream-Status: Inappropriate [https://gitlab.com/gnutls/gnutls/-/issues/1373] | ||
8 | Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> | ||
9 | --- | ||
10 | lib/Makefile.am | 3 +-- | ||
11 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/lib/Makefile.am b/lib/Makefile.am | ||
14 | index a50d311..193ea19 100644 | ||
15 | --- a/lib/Makefile.am | ||
16 | +++ b/lib/Makefile.am | ||
17 | @@ -272,8 +272,7 @@ hmac_file = .libs/.$(gnutls_so).hmac | ||
18 | |||
19 | all-local: $(hmac_file) | ||
20 | |||
21 | -$(hmac_file): libgnutls.la fipshmac | ||
22 | - $(AM_V_GEN) $(builddir)/fipshmac > $@-t && mv $@-t $@ | ||
23 | +.libs/.$(gnutls_so).hmac: | ||
24 | |||
25 | CLEANFILES = $(hmac_file) | ||
26 | endif | ||
diff --git a/meta/recipes-support/gnutls/gnutls/Add-ptest-support.patch b/meta/recipes-support/gnutls/gnutls/Add-ptest-support.patch new file mode 100644 index 0000000000..339d3d2f9e --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls/Add-ptest-support.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From 6abc86acecff5a30173eb78a971ec5b65f77e1de Mon Sep 17 00:00:00 2001 | ||
2 | From: Ravineet Singh <ravineet.a.singh@est.tech> | ||
3 | Date: Tue, 10 Jan 2023 16:11:10 +0100 | ||
4 | Subject: [PATCH] gnutls: add ptest support | ||
5 | |||
6 | Upstream-Status: Inappropriate [embedded specific] | ||
7 | Signed-off-by: Ravineet Singh <ravineet.a.singh@est.tech> | ||
8 | --- | ||
9 | Makefile.am | 3 +++ | ||
10 | configure.ac | 2 ++ | ||
11 | tests/Makefile.am | 6 ++++++ | ||
12 | 3 files changed, 11 insertions(+) | ||
13 | |||
14 | diff --git a/Makefile.am b/Makefile.am | ||
15 | index 843193f..816b09f 100644 | ||
16 | --- a/Makefile.am | ||
17 | +++ b/Makefile.am | ||
18 | @@ -194,6 +194,9 @@ dist-hook: | ||
19 | distcheck-hook: | ||
20 | @test -d "$(top_srcdir)/po/.reference" || { echo "PO files are not downloaded; run ./bootstrap without --skip-po"; exit 1; } | ||
21 | |||
22 | +install-ptest: | ||
23 | + $(MAKE) -C tests DESTDIR=$(DESTDIR)/tests $@ | ||
24 | + | ||
25 | .PHONY: abi-check abi-dump-versioned abi-dump-latest pic-check symbol-check local-code-coverage-output files-update AUTHORS | ||
26 | |||
27 | include $(top_srcdir)/cligen/cligen.mk | ||
28 | diff --git a/configure.ac b/configure.ac | ||
29 | index 1744813..efb9e34 100644 | ||
30 | --- a/configure.ac | ||
31 | +++ b/configure.ac | ||
32 | @@ -1491,6 +1491,8 @@ AC_SUBST(LIBGNUTLS_CFLAGS) | ||
33 | |||
34 | AM_CONDITIONAL(NEEDS_LIBRT, test "$gnutls_needs_librt" = "yes") | ||
35 | |||
36 | +AM_EXTRA_RECURSIVE_TARGETS([buildtest-TESTS]) | ||
37 | + | ||
38 | AC_DEFINE([GNUTLS_INTERNAL_BUILD], 1, [We allow temporarily usage of deprecated functions - until they are removed.]) | ||
39 | |||
40 | hw_features= | ||
41 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
42 | index 189d068..8430b05 100644 | ||
43 | --- a/tests/Makefile.am | ||
44 | +++ b/tests/Makefile.am | ||
45 | @@ -678,6 +678,12 @@ SH_LOG_COMPILER = $(SHELL) | ||
46 | AM_VALGRINDFLAGS = --suppressions=$(srcdir)/suppressions.valgrind | ||
47 | LOG_COMPILER = $(LOG_VALGRIND) | ||
48 | |||
49 | +install-ptest: $(check_PROGRAMS) | ||
50 | + @$(INSTALL) -d $(DESTDIR) | ||
51 | + @for file in $^; do \ | ||
52 | + $(INSTALL_PROGRAM) $$file $(DESTDIR) ; \ | ||
53 | + done | ||
54 | + | ||
55 | distclean-local: | ||
56 | rm -rf softhsm-*.db softhsm-*.config *.tmp tmp-* x509-crt-list-import-url.config.db port.lock.d | ||
57 | |||
diff --git a/meta/recipes-support/gnutls/gnutls/arm_eabi.patch b/meta/recipes-support/gnutls/gnutls/arm_eabi.patch index 6eb1edbdb1..d493448aab 100644 --- a/meta/recipes-support/gnutls/gnutls/arm_eabi.patch +++ b/meta/recipes-support/gnutls/gnutls/arm_eabi.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 8a5c96057cf305bbeac0d6e0e59ee24fbb9497fe Mon Sep 17 00:00:00 2001 | 1 | From 46b3079095c5ceb0dc742785853bbaf288f325c6 Mon Sep 17 00:00:00 2001 |
2 | From: Joe Slater <jslater@windriver.com> | 2 | From: Joe Slater <jslater@windriver.com> |
3 | Date: Wed, 25 Jan 2017 13:52:59 -0800 | 3 | Date: Wed, 25 Jan 2017 13:52:59 -0800 |
4 | Subject: [PATCH] gnutls: account for ARM_EABI | 4 | Subject: [PATCH] gnutls: account for ARM_EABI |
@@ -9,16 +9,15 @@ reference to them. | |||
9 | Upstream-Status: Pending | 9 | Upstream-Status: Pending |
10 | 10 | ||
11 | Signed-off-by: Joe Slater <jslater@windriver.com> | 11 | Signed-off-by: Joe Slater <jslater@windriver.com> |
12 | |||
13 | --- | 12 | --- |
14 | tests/seccomp.c | 2 ++ | 13 | tests/seccomp.c | 2 ++ |
15 | 1 file changed, 2 insertions(+) | 14 | 1 file changed, 2 insertions(+) |
16 | 15 | ||
17 | diff --git a/tests/seccomp.c b/tests/seccomp.c | 16 | diff --git a/tests/seccomp.c b/tests/seccomp.c |
18 | index ed14d00..3c5b726 100644 | 17 | index 881f0bb..5f9204a 100644 |
19 | --- a/tests/seccomp.c | 18 | --- a/tests/seccomp.c |
20 | +++ b/tests/seccomp.c | 19 | +++ b/tests/seccomp.c |
21 | @@ -53,7 +53,9 @@ int disable_system_calls(void) | 20 | @@ -55,7 +55,9 @@ int disable_system_calls(void) |
22 | 21 | ||
23 | ADD_SYSCALL(nanosleep, 0); | 22 | ADD_SYSCALL(nanosleep, 0); |
24 | ADD_SYSCALL(clock_nanosleep, 0); | 23 | ADD_SYSCALL(clock_nanosleep, 0); |
diff --git a/meta/recipes-support/gnutls/gnutls/run-ptest b/meta/recipes-support/gnutls/gnutls/run-ptest new file mode 100644 index 0000000000..17e26eae70 --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls/run-ptest | |||
@@ -0,0 +1,100 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | rjob() { | ||
4 | local job=$1 | ||
5 | local log=$2 | ||
6 | |||
7 | # TODO: Output will be garbled | ||
8 | ./${job} >> ${log} 2>&1 | ||
9 | |||
10 | ret=$? | ||
11 | case $ret in | ||
12 | 0) | ||
13 | echo "PASS: $t" >> ${log} | ||
14 | echo "PASS: $t" | ||
15 | ;; | ||
16 | 77) | ||
17 | echo "SKIP: $t" >> ${log} | ||
18 | echo "SKIP: $t" | ||
19 | ;; | ||
20 | *) | ||
21 | echo "FAIL: $t" >> ${log} | ||
22 | echo "FAIL: $t" | ||
23 | ;; | ||
24 | esac | ||
25 | } | ||
26 | |||
27 | is_disallowed() { | ||
28 | local key=$1 | ||
29 | $(echo ${test_disallowlist} | grep -w -q ${key}) | ||
30 | return $? | ||
31 | } | ||
32 | |||
33 | # TODO | ||
34 | # This list should probably be in a external file | ||
35 | # Testcases defined here either take very long time (dtls-stress) | ||
36 | # or are dependent on local files (certs, etc) in local file system | ||
37 | # currently not exported to target. | ||
38 | |||
39 | test_disallowlist="" | ||
40 | test_disallowlist="${test_disallowlist} dtls-stress" | ||
41 | test_disallowlist="${test_disallowlist} handshake-large-cert" | ||
42 | test_disallowlist="${test_disallowlist} id-on-xmppAddr" | ||
43 | test_disallowlist="${test_disallowlist} mini-x509-cas" | ||
44 | test_disallowlist="${test_disallowlist} pkcs12_simple" | ||
45 | test_disallowlist="${test_disallowlist} protocol-set-allowlist" | ||
46 | test_disallowlist="${test_disallowlist} psk-file" | ||
47 | test_disallowlist="${test_disallowlist} rawpk-api" | ||
48 | test_disallowlist="${test_disallowlist} set_pkcs12_cred" | ||
49 | test_disallowlist="${test_disallowlist} system-override-curves-allowlist" | ||
50 | test_disallowlist="${test_disallowlist} system-override-hash" | ||
51 | test_disallowlist="${test_disallowlist} system-override-sig" | ||
52 | test_disallowlist="${test_disallowlist} system-override-sig-tls" | ||
53 | test_disallowlist="${test_disallowlist} system-prio-file" | ||
54 | test_disallowlist="${test_disallowlist} x509cert-tl" | ||
55 | |||
56 | LOG=${PWD}/tests.log | ||
57 | cd tests | ||
58 | max_njobs=$(grep -c ^processor /proc/cpuinfo) | ||
59 | njobs=0 | ||
60 | |||
61 | set +e | ||
62 | |||
63 | for t in *; do | ||
64 | [ -x $t ] || continue | ||
65 | [ -f $t ] || continue | ||
66 | |||
67 | is_disallowed ${t} | ||
68 | [ $? -eq 0 ] && continue | ||
69 | |||
70 | rjob ${t} ${LOG} & | ||
71 | one=1 | ||
72 | njobs=$(expr ${njobs} + ${one}) | ||
73 | if [ ${njobs} -eq ${max_njobs} ]; then | ||
74 | wait | ||
75 | njobs=0 | ||
76 | fi | ||
77 | done | ||
78 | wait | ||
79 | |||
80 | skipped=$(grep -c SKIP ${LOG}) | ||
81 | passed=$(grep -c PASS ${LOG}) | ||
82 | failed=$(grep -c FAIL ${LOG}) | ||
83 | total=$(expr ${passed} + ${failed} + ${skipped}) | ||
84 | |||
85 | if [ ${failed} -ne 0 ]; then | ||
86 | echo | ||
87 | echo "Tests failed for gnutls, log is:" | ||
88 | echo "--------------------" | ||
89 | cat ${LOG} | ||
90 | echo | ||
91 | fi | ||
92 | |||
93 | echo | ||
94 | echo "gnutls test summary:" | ||
95 | echo "--------------------" | ||
96 | echo "total: ${total}" | ||
97 | echo "pass : ${passed}" | ||
98 | echo "fail : ${failed}" | ||
99 | echo "skip : ${skipped}" | ||
100 | echo | ||