2019-05-14 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ [BZ #24544]
+ * elf/tst-pldd.c (do_test): Use support_bindir_prefix instead of
+ pre-defined value.
+
* support/Makefile (CFLAGS-support_paths.c): Add -DBINDIR_PATH.
* support/support.h (support_bindir_prefix): New variable.
* support/support_paths.c [BINDIR_PATH] (support_bindir_prefix):
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <stdbool.h>
#include <support/subprocess.h>
#include <support/capture_subprocess.h>
#include <support/check.h>
+#include <support/support.h>
static void
target_process (void *arg)
char pid[3 * sizeof (uint32_t) + 1];
snprintf (pid, array_length (pid), "%d", target.pid);
- const char prog[] = "/usr/bin/pldd";
+ char *prog = xasprintf ("%s/pldd", support_bindir_prefix);
pldd = support_capture_subprogram (prog,
(char *const []) { (char *) prog, pid, NULL });
support_capture_subprocess_check (&pldd, "pldd", 0, sc_allow_stdout);
+
+ free (prog);
}
/* Check 'pldd' output. The test is expected to be linked against only