old-cross-binutils/gdb/testsuite/gdb.multi/bkpt-multi-exec.c
Tom Tromey 3fef966c5f fix some "exec" tests
A few tests run an inferior that execs some other program.  The name
of this exec'd program is compiled in.  These tests assume the current
test suite directory layout, but fail in parallel mode.

This patch fixes these tests by letting the .exp files pass in the
directory names at compile time.

2013-11-04  Tom Tromey  <tromey@redhat.com>

	* gdb.base/foll-exec.c (main): Use BASEDIR.
	* gdb.base/foll-exec.exp: Define BASEDIR during compilation.
	* gdb.base/foll-vfork.c (main): Use BASEDIR.
	* gdb.base/foll-vfork.exp: Define BASEDIR during compilation.
	* gdb.multi/bkpt-multi-exec.c (main): Use BASEDIR.
	* gdb.multi/bkpt-multi-exec.exp: Define BASEDIR during compilation.
2013-11-04 11:02:10 -07:00

13 lines
236 B
C

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
int main (void)
{
printf ("foll-exec is about to execl(crashme)...\n");
execl (BASEDIR "/crashme",
BASEDIR "/crashme",
(char *)0);
}