From: Evgeny Vereshchagin Date: Sun, 19 Jun 2016 23:43:35 +0000 (+0000) Subject: tests: don't run test_get_process_cmdline_harder under valgrind X-Git-Tag: v231~142^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b3d69149bd03b1b42ded4661bfd799778844e4c1;p=thirdparty%2Fsystemd.git tests: don't run test_get_process_cmdline_harder under valgrind See https://github.com/systemd/systemd/pull/3555#issuecomment-226564908 --- diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c index af2c9282d47..99c92780b80 100644 --- a/src/test/test-process-util.c +++ b/src/test/test-process-util.c @@ -26,6 +26,9 @@ #include #include #include +#ifdef HAVE_VALGRIND_VALGRIND_H +#include +#endif #include "alloc-util.h" #include "architecture.h" @@ -164,6 +167,14 @@ static void test_get_process_cmdline_harder(void) { if (geteuid() != 0) return; +#ifdef HAVE_VALGRIND_VALGRIND_H + /* valgrind patches open(/proc//cmdline) + * so, test_get_process_cmdline_harder fails always + * See https://github.com/systemd/systemd/pull/3555#issuecomment-226564908 */ + if (RUNNING_ON_VALGRIND) + return; +#endif + pid = fork(); if (pid > 0) { siginfo_t si;