This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: running the test suite without building stap


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]