mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 10:21:20 +00:00
checking of programs done in these two places are combined, which avoids duplicate code and greatly reduces the number of cases in which exec() fails causing Valgrind to bomb out. Also, we can now load some programs we could not previously, such as scripts lacking a "#!" line at the start. Also, the startup failure messages for bad programs match the shell's messages very closely. And I added a whole bunch of regtests to test all this. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4918
42 lines
969 B
Bash
Executable File
42 lines
969 B
Bash
Executable File
#! /bin/sh
|
|
#
|
|
# Testing various shell script invocations.
|
|
|
|
#----------------------------------------------------------------------------
|
|
# Shell scripts that should fail
|
|
#----------------------------------------------------------------------------
|
|
|
|
echo "Execute a directory"
|
|
x86/
|
|
|
|
echo "Execute a directory (2)"
|
|
x86
|
|
|
|
echo "Execute a non-executable file"
|
|
shell.vgtest
|
|
|
|
echo "Execute a script with a bad interpreter name"
|
|
shell_badinterp
|
|
|
|
echo "Execute a binary file"
|
|
shell_binaryfile
|
|
|
|
echo "Execute a non-existent file"
|
|
shell_nosuchfile
|
|
|
|
#----------------------------------------------------------------------------
|
|
# Shell scripts that should pass
|
|
#----------------------------------------------------------------------------
|
|
echo "Execute a valid script with a #! line"
|
|
shell_valid1
|
|
|
|
echo "Execute a valid script without a #! line"
|
|
shell_valid2
|
|
|
|
echo "Execute a valid script with #! but no interpname"
|
|
shell_valid3
|
|
|
|
echo "Execute a zero-length file"
|
|
shell_zerolength
|
|
|