torture: Make "--dryrun script" use same environment as normal run
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 28 Feb 2014 04:26:57 +0000 (20:26 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 14 May 2014 16:45:56 +0000 (09:45 -0700)
In a normal torture-test run, the script inherits its environment
variables, but this does not work when producing a script that is
to run later.  Therefore, definitions and exports are prepended to
a dryrun script but not to a script that is run immediately.  This
commit reconciles this by placing definitions and exports at the
beginning of the script in both cases.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Conflicts:
tools/testing/selftests/rcutorture/bin/kvm.sh

tools/testing/selftests/rcutorture/bin/kvm.sh