summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-02-22 23:04:12 +0900
committerGitHub <noreply@github.com>2023-02-22 23:04:12 +0900
commit58fbf167d76e51b0962785ff5efb780def37ad43 (patch)
treed21ba63c8c50433db2a59c2d88f5424099f078db /src/libsystemd-network
parent97be742d95a0f0fb7a6602085d852803ed1e0aab (diff)
parent18e100172c8b68fd118979dd535be80748112aad (diff)
downloadsystemd-58fbf167d76e51b0962785ff5efb780def37ad43.tar.gz
Merge pull request #26528 from keszybz/valgrind-simplification
Drop the -Dvalgrind configuration option
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/test-dhcp-client.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsystemd-network/test-dhcp-client.c b/src/libsystemd-network/test-dhcp-client.c
index 863649f6df..e4354199e1 100644
--- a/src/libsystemd-network/test-dhcp-client.c
+++ b/src/libsystemd-network/test-dhcp-client.c
@@ -9,6 +9,9 @@
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
+#if HAVE_VALGRIND_VALGRIND_H
+# include <valgrind/valgrind.h>
+#endif
#include "sd-dhcp-client.h"
#include "sd-event.h"
@@ -546,11 +549,12 @@ int main(int argc, char *argv[]) {
test_discover_message(e);
test_addr_acq(e);
-#if VALGRIND
+#if HAVE_VALGRIND_VALGRIND_H
/* Make sure the async_close thread has finished.
* valgrind would report some of the phread_* structures
* as not cleaned up properly. */
- sleep(1);
+ if (RUNNING_ON_VALGRIND)
+ sleep(1);
#endif
return 0;