This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: running the test suite without building stap
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Wed, 21 Mar 2007 10:34:52 -0400
- Subject: Re: running the test suite without building stap
- References: <20070314152339.GS27273@redhat.com> <46013FEA.3030002@linux.vnet.ibm.com>
Hi -
On Wed, Mar 21, 2007 at 07:53:38PM +0530, Srikar Dronamraju wrote:
> I was trying the new configure script.
THanks!
> The stp files under testsuite subdirectories have a magic number of "#!
> stap"
> [...]
> This fix was made by Dan Smith to make sure that tests are run with the
> right stap binaries (sometime in feb end .. early march)
> # The stap symlink is to enable "#! stap" test scripts.
> all-local:
> @ln -sf $(STAP_TESTDIR)/stap .
> However with the current snapshot this has been modified.
Indeed. The new method relies on explicitly setting $PATH to the
actual build or install directory, and not on any individual symlink
in the testsuite subdirectory. "#! stap" is not really appropriate,
since it lacks a full path.
> Hence whenever the tests under testsuite are run without explicitly stap
> binary they fail with the message.
> [srikar@llm27lp1 testsuite]$ transok/five.stp
> bash: transok/five.stp: stap: bad interpreter: No such file or directory
The solution is to not treat those files as shell scripts, and just
run them via "stap [OPTIONS] transok/five.stp". The OPTIONS need
to be pulled out of the .stp file.
Another solution would be to slightly rewrite all the stp files to be
proper shell scripts, perhaps like this:
#! /bin/sh
exec stap [OPTIONS] -e - << 'END'
SCRIPT
END
- FChE