diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2015-06-17 14:29:09 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-07-02 13:45:41 +0200 |
commit | 323943605c88838f1f86a72f891eb28600bb34e2 (patch) | |
tree | 6ed1400bbe96ea36b55040085eced56fda2830a5 | |
parent | 0469c14cae927298838e92d5827c803ca694e7e0 (diff) | |
download | sssd-323943605c88838f1f86a72f891eb28600bb34e2.tar.gz sssd-323943605c88838f1f86a72f891eb28600bb34e2.tar.xz sssd-323943605c88838f1f86a72f891eb28600bb34e2.zip |
test_ipa_subdomains_server: Fix build with --coverage
It seems that gcc did some optimization and
used execve instead of execle when the code was
instrumented for coverage analysis.
So the exec* function was not wrapped and it tried to call
real binary ipa-getkeytab
Reviewed-by: Michal Židek <mzidek@redhat.com>
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | src/tests/cmocka/test_ipa_subdomains_server.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 93a32dbdb..8fa532d30 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2499,6 +2499,7 @@ test_ipa_subdom_server_CFLAGS = \ test_ipa_subdom_server_LDFLAGS = \ -Wl,-wrap,krb5_kt_default \ -Wl,-wrap,execle \ + -Wl,-wrap,execve \ $(NULL) test_ipa_subdom_server_LDADD = \ $(PAM_LIBS) \ diff --git a/src/tests/cmocka/test_ipa_subdomains_server.c b/src/tests/cmocka/test_ipa_subdomains_server.c index 5b7b81582..28e998b57 100644 --- a/src/tests/cmocka/test_ipa_subdomains_server.c +++ b/src/tests/cmocka/test_ipa_subdomains_server.c @@ -89,6 +89,12 @@ int __wrap_execle(const char *path, const char *arg, ...) _exit(0); } +int __wrap_execve(const char *path, const char *arg, ...) +{ + create_dummy_keytab(); + _exit(0); +} + struct trust_test_ctx { struct sss_test_ctx *tctx; struct be_ctx *be_ctx; |