kumquat-buildroot/package/samba4/0006-autobuild-harden-samba-xc-test-suite.patch
Bernd Kuhls e365ff6619 package/samba4: bump version to 4.11.2
Added patches from upstream bug tracker to fix cross-compile problems,
removed patches applied upstream and rebase remaining patches.

The dependency to gnutls is now mandatory:
https://blog.cryptomilk.org/2019/10/02/samba-and-gnutls/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-11-07 22:11:15 +01:00

60 lines
3.1 KiB
Diff

From 74e95015050ed3dd7229140f2f0f7f0b7a2d8c01 Mon Sep 17 00:00:00 2001
From: Uri Simchoni <uri@samba.org>
Date: Wed, 9 Oct 2019 21:53:43 +0300
Subject: [PATCH] autobuild: harden samba-xc test suite
Add more checks which directly test the behavior of
--cross-answers and --cross-execute.
Previous test tested things in a round-about way, checking
that running in all three modes (native, cross-execute,
cross-answers) yields the same result. It was vulnerable
to a degradation in which cross-compilation modes didn't
work at all and were running native tests, which is
what happened with the upgrade of waf.
The added tests check the following:
- That cross-excute with cross-answers sets the cross-answers file
- That the content of cross-answers file actually affects the build
configuration
- That a missing line in cross-answers fails the build
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846
Signed-off-by: Uri Simchoni <uri@samba.org>
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
script/autobuild.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/script/autobuild.py b/script/autobuild.py
index ef75f507add..465d1950ec2 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -430,12 +430,22 @@ tasks = {
("configure-native", "./configure.developer --with-selftest-prefix=./bin/ab" + samba_configure_params),
("configure-cross-execute", "./configure.developer --out ./bin-xe --cross-compile --cross-execute=script/identity_cc.sh" \
" --cross-answers=./bin-xe/cross-answers.txt --with-selftest-prefix=./bin-xe/ab" + samba_configure_params),
+ ("verify-cross-execute-output", "grep '^Checking value of NSIG' ./bin-xe/cross-answers.txt"),
("configure-cross-answers", "./configure.developer --out ./bin-xa --cross-compile" \
" --cross-answers=./bin-xe/cross-answers.txt --with-selftest-prefix=./bin-xa/ab" + samba_configure_params),
("compare-results", "script/compare_cc_results.py "
"./bin/c4che/default{} "
"./bin-xe/c4che/default{} "
"./bin-xa/c4che/default{}".format(*([CACHE_SUFFIX]*3))),
+ ("modify-cross-answers", "sed -i.bak -e 's/^\\(Checking value of NSIG:\\) .*/\\1 \"1234\"/' ./bin-xe/cross-answers.txt"),
+ ("configure-cross-answers-modified", "./configure.developer --out ./bin-xa2 --cross-compile" \
+ " --cross-answers=./bin-xe/cross-answers.txt --with-selftest-prefix=./bin-xa2/ab" + samba_configure_params),
+ ("verify-cross-answers", "test $(sed -n -e 's/VALUEOF_NSIG = \\(.*\\)/\\1/p' ./bin-xa2/c4che/default{})" \
+ " = \"'1234'\"".format(CACHE_SUFFIX)),
+ ("invalidate-cross-answers", "sed -i.bak -e '/^Checking value of NSIG/d' ./bin-xe/cross-answers.txt"),
+ ("configure-cross-answers-fail", "./configure.developer --out ./bin-xa3 --cross-compile" \
+ " --cross-answers=./bin-xe/cross-answers.txt --with-selftest-prefix=./bin-xa3/ab" + samba_configure_params + \
+ " ; test $? -ne 0"),
],
# test build with -O3 -- catches extra warnings and bugs, tests the ad_dc environments
--
2.20.1