1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-27 01:57:35 +03:00

tests: don't run test_get_process_cmdline_harder under valgrind

See https://github.com/systemd/systemd/pull/3555#issuecomment-226564908
This commit is contained in:
Evgeny Vereshchagin 2016-06-19 23:43:35 +00:00
parent b774852ae6
commit b3d69149bd

@ -26,6 +26,9 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#ifdef HAVE_VALGRIND_VALGRIND_H
#include <valgrind/valgrind.h>
#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;