summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/features/exec6
-rw-r--r--tests/scripts/features/jobserver3
-rw-r--r--tests/scripts/features/output-sync18
-rw-r--r--tests/scripts/features/temp_stdin19
-rw-r--r--tests/scripts/functions/guile3
-rw-r--r--tests/scripts/functions/wildcard3
6 files changed, 35 insertions, 17 deletions
diff --git a/tests/scripts/features/exec b/tests/scripts/features/exec
index f139cf8c..d96d31c1 100644
--- a/tests/scripts/features/exec
+++ b/tests/scripts/features/exec
@@ -15,7 +15,11 @@ my $details = "The various shells that this test uses are the default"
$port_type eq 'UNIX' or return -1;
$^O =~ /cygwin/ and return -1;
-my @shbangs = ('', '#!/bin/sh', "#!$perl_name");
+my @shbangs = ('#!/bin/sh', "#!$perl_name");
+
+# The exec in Valgrind's VM doesn't allow starting commands without any shbang
+$valgrind or push @shbangs, '';
+
my @shells = ('', 'SHELL=/bin/sh');
# Try whatever shell the user has, as long as it's not a C shell.
diff --git a/tests/scripts/features/jobserver b/tests/scripts/features/jobserver
index a2f06ee8..ad5f9e7f 100644
--- a/tests/scripts/features/jobserver
+++ b/tests/scripts/features/jobserver
@@ -168,7 +168,8 @@ if ($port_type ne 'W32') {
"all 1\nall 2\nrecurse");
}
-if (exists $FEATURES{'jobserver-fifo'}) {
+# We can't reset TMPDIR to something invalid when using valgrind
+if (exists $FEATURES{'jobserver-fifo'} && !$valgrind) {
# sv 62908.
# Test that when mkfifo fails, make switches to pipe and succeeds.
# Force mkfifo to fail by attempting to create a fifo in a non existent
diff --git a/tests/scripts/features/output-sync b/tests/scripts/features/output-sync
index 3353f1c6..779e24c8 100644
--- a/tests/scripts/features/output-sync
+++ b/tests/scripts/features/output-sync
@@ -380,17 +380,23 @@ unlink($fout);
# Create a non-writable temporary directory.
# Run the test twice, because run_make_test cannot match a regex against a
# multiline input.
-my $tdir = 'test_tmp_dir';
-mkdir($tdir, 0500);
-$ENV{'TMPDIR'} = $tdir;
-run_make_test(q!
+# If we do this Valgrind fails because it cannot write temp files... the docs
+# don't describe any way to tell valgrind to use a directory other than TMPDIR.
+
+if (!$valgrind) {
+ my $tdir = 'test_tmp_dir';
+ mkdir($tdir, 0500);
+ $ENV{'TMPDIR'} = $tdir;
+
+ run_make_test(q!
all:; $(info hello, world)
!, '-Orecurse', "/suppressing output-sync/");
-run_make_test(undef, '-Orecurse', "/#MAKE#: 'all' is up to date./");
+ run_make_test(undef, '-Orecurse', "/#MAKE#: 'all' is up to date./");
-rmdir($tdir);
+ rmdir($tdir);
+}
}
# This tells the test driver that the perl test script executed properly.
diff --git a/tests/scripts/features/temp_stdin b/tests/scripts/features/temp_stdin
index fee32a90..201dcb94 100644
--- a/tests/scripts/features/temp_stdin
+++ b/tests/scripts/features/temp_stdin
@@ -115,16 +115,21 @@ rmdir($tmakedir);
# makefile from stdin to a temporary file.
# Create a non-writable temporary directory.
-my $tdir = 'test_tmp_dir';
-mkdir($tdir, 0500);
-$ENV{'TMPDIR'} = $tdir;
-close(STDIN);
-open(STDIN, "<", 'input.mk') || die "$0: cannot open input.mk for reading: $!";
+# If we do this Valgrind fails because it cannot write temp files... the docs
+# don't describe any way to tell valgrind to use a directory other than TMPDIR.
-run_make_test(q!
+if (!$valgrind) {
+ my $tdir = 'test_tmp_dir';
+ mkdir($tdir, 0500);
+ $ENV{'TMPDIR'} = $tdir;
+ close(STDIN);
+ open(STDIN, "<", 'input.mk') || die "$0: cannot open input.mk for reading: $!";
+
+ run_make_test(q!
all:; $(info hello, world)
!, '-f-', '/cannot store makefile from stdin to a temporary file. Stop./', 512);
-rmdir($tdir);
+ rmdir($tdir);
+}
}
# This close MUST come at the end of the test!!
diff --git a/tests/scripts/functions/guile b/tests/scripts/functions/guile
index 120aaf3b..8c0012d9 100644
--- a/tests/scripts/functions/guile
+++ b/tests/scripts/functions/guile
@@ -21,7 +21,8 @@ $details = 'This only works on systems that support it.';
# If we don't have Guile support, never mind.
exists $FEATURES{guile} or return -1;
-# Guile and Valgrind don't play together at all.
+# Guile and Valgrind/ASAN don't play together at all.
+exists $FEATURES{sanitize} and return -1;
$valgrind and return -1;
# Verify simple data type conversions
diff --git a/tests/scripts/functions/wildcard b/tests/scripts/functions/wildcard
index f01f574a..1a1addda 100644
--- a/tests/scripts/functions/wildcard
+++ b/tests/scripts/functions/wildcard
@@ -150,8 +150,9 @@ if ($port_type ne 'W32' && eval { symlink("",""); 1 }) {
# Test for dangling symlinks
# This doesn't work with the built-in glob... needs to be updated!
+ # It also for some obscure reason, will break if we use ASAN!!
- if (get_config('USE_SYSTEM_GLOB') eq 'yes') {
+ if (get_config('USE_SYSTEM_GLOB') eq 'yes' && !exists($FEATURES{sanitize})) {
symlink($dir, $lnk);
run_make_test(qq!all: ; \@echo \$(wildcard $lnk)!, '', "$lnk");