summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2016-01-13 23:06:33 +0100
committerMark Wielaard <mjw@redhat.com>2016-01-18 15:24:27 +0100
commit0cd02dcafcfdaff56f483f41c0ec45de756c7083 (patch)
treec47ebcdb5ab9a997ca351fe585b217c23380d909
parent624e3cb81d436282fa9f6ce4fa63203bad236057 (diff)
downloadelfutils-0cd02dcafcfdaff56f483f41c0ec45de756c7083.tar.gz
elfutils-0cd02dcafcfdaff56f483f41c0ec45de756c7083.tar.xz
tests: Skip dwfl-bug-fd-leak test if dwfl_linux_proc_report is unsupported.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/dwfl-bug-fd-leak.c10
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 34104ff..37f9811 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,9 @@
2016-01-13 Mark Wielaard <mjw@redhat.com>
+ * dwfl-bug-fd-leak.c: Skip test unless on __linux__.
+
+2016-01-13 Mark Wielaard <mjw@redhat.com>
+
* dwfl-proc-attach.c: Guard linux specific header.
2016-01-13 Mark Wielaard <mjw@redhat.com>
diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c
index bcbfb29..689cdd7 100644
--- a/tests/dwfl-bug-fd-leak.c
+++ b/tests/dwfl-bug-fd-leak.c
@@ -27,6 +27,15 @@
#include <error.h>
#include <unistd.h>
#include <dwarf.h>
+
+#ifndef __linux__
+int
+main (void)
+{
+ return 77; /* dwfl_linux_proc_report is linux specific. */
+}
+#else
+
#include <sys/resource.h>
#include ELFUTILS_HEADER(dwfl)
@@ -104,3 +113,4 @@ main (void)
return 0;
}
+#endif