tests: Accommodate c-tap-harness 4.7
[openafs.git] / tests / opr / softsig-t
index 09f4e50..d750d98 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #
 # Copyright (c) 2010 Your File System Inc. All rights reserved.
 #
@@ -36,10 +36,10 @@ use FindBin qw($Bin);
 my $softsig_helper;
 
 # Our softsig helper should be in $TOP_OBJDIR/tests/opr. To calculate that
-# path, use the BUILD env var if the test harness has set it; otherwise, our
-# next best guess is that it's in the same dir as this script.
-if (defined($ENV{BUILD})) {
-    $softsig_helper = $ENV{BUILD} . "/opr/softsig-helper";
+# path, use the C_TAP_BUILD env var if the test harness has set it; otherwise,
+# our next best guess is that it's in the same dir as this script.
+if (defined($ENV{C_TAP_BUILD})) {
+    $softsig_helper = $ENV{C_TAP_BUILD} . "/opr/softsig-helper";
 } else {
     $softsig_helper = $Bin . "/softsig-helper";
 }
@@ -98,6 +98,7 @@ is($? & 0x7f, SIGSEGV, "Helper exited on SEGV signal.");
 SKIP: {
     my $sigbus = eval "SIGBUS";
     skip("Skipping buserror test; SIGBUS constant is not defined.", 1) unless $sigbus;
+    skip("Skipping buserror test; test unreliable on FreeBSD.", 1) if ($^O eq 'freebsd');
 
     my ($fh, $path) = mkstemp("/tmp/softsig-t_XXXXXX");
     $pid = open(HELPER, "-|", $softsig_helper, "-buserror", $path)