summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-12-30 16:21:07 -0200
committerRenato Botelho <renato@netgate.com>2015-12-30 16:21:07 -0200
commitd8ff3484131f428fcc0727cd504acb5050a36490 (patch)
tree8adfbb5b779f497e621d29277fcbe1536012eeb0 /contrib
parent0319542cc712df59c57f014b4f925f516bcb5b4b (diff)
parentecf8336fcdf81e2aeb30a7ab82841dd7299ceb98 (diff)
downloadFreeBSD-src-d8ff3484131f428fcc0727cd504acb5050a36490.zip
FreeBSD-src-d8ff3484131f428fcc0727cd504acb5050a36490.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'contrib')
-rw-r--r--contrib/netbsd-tests/lib/libc/gen/t_assert.c23
-rwxr-xr-xcontrib/netbsd-tests/lib/libc/ssp/t_ssp.sh1
-rw-r--r--contrib/netbsd-tests/usr.bin/grep/d_binary.out2
-rwxr-xr-xcontrib/netbsd-tests/usr.bin/grep/t_grep.sh13
4 files changed, 38 insertions, 1 deletions
diff --git a/contrib/netbsd-tests/lib/libc/gen/t_assert.c b/contrib/netbsd-tests/lib/libc/gen/t_assert.c
index 140417a..a09c130 100644
--- a/contrib/netbsd-tests/lib/libc/gen/t_assert.c
+++ b/contrib/netbsd-tests/lib/libc/gen/t_assert.c
@@ -40,6 +40,23 @@ __RCSID("$NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $");
#include <string.h>
#include <unistd.h>
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+
+static void
+disable_corefile(void)
+{
+ struct rlimit limits;
+
+ limits.rlim_cur = 0;
+ limits.rlim_max = 0;
+
+ ATF_REQUIRE(setrlimit(RLIMIT_CORE, &limits) == 0);
+}
+#endif
+
static void handler(int);
static void
@@ -65,6 +82,9 @@ ATF_TC_BODY(assert_false, tc)
if (pid == 0) {
+#ifdef __FreeBSD__
+ disable_corefile();
+#endif
(void)closefrom(0);
(void)memset(&sa, 0, sizeof(struct sigaction));
@@ -102,6 +122,9 @@ ATF_TC_BODY(assert_true, tc)
if (pid == 0) {
+#ifdef __FreeBSD__
+ disable_corefile();
+#endif
(void)closefrom(0);
(void)memset(&sa, 0, sizeof(struct sigaction));
diff --git a/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh b/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
index 04adc67..2986ccf 100755
--- a/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
+++ b/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
@@ -35,6 +35,7 @@ h_fail()
{
echo "Executing command [ $2$1 ]"
# Begin FreeBSD
+ ulimit -c 0
if true; then
eval $2 atf_check -s signal -o ignore -e ignore $1
else
diff --git a/contrib/netbsd-tests/usr.bin/grep/d_binary.out b/contrib/netbsd-tests/usr.bin/grep/d_binary.out
index ce03056..f0ef988 100644
--- a/contrib/netbsd-tests/usr.bin/grep/d_binary.out
+++ b/contrib/netbsd-tests/usr.bin/grep/d_binary.out
@@ -1 +1 @@
-Binary file /bin/sh matches
+Binary file test.file matches
diff --git a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
index f2d70f0..7e53016 100755
--- a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
+++ b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
@@ -43,7 +43,20 @@ binary_head()
}
binary_body()
{
+ # Begin FreeBSD
+ #
+ # Generate stable output instead of depending on uname to match the
+ # branded OS name of /bin/sh
+ if true; then
+ dd if=/dev/zero count=1 of=test.file
+ echo -n "foobar" >> test.file
+ atf_check -o file:"$(atf_get_srcdir)/d_binary.out" grep foobar test.file
+ else
+ # End FreeBSD
atf_check -o file:"$(atf_get_srcdir)/d_binary.out" grep $(uname) /bin/sh
+ # Begin FreeBSD
+ fi
+ # End FreeBSD
}
atf_test_case recurse
OpenPOWER on IntegriCloud