Commit Graph

78 Commits

Author SHA1 Message Date
ngie
d1031afa9a Port t_db.sh to FreeBSD
- The blocksize on FreeBSD is 32kB, not 64kB
- Add some detection for MK_DICT == no; /nonexistent is echoed along with
  atf_skip to ensure that the test will fail if dict(..) is called in the
  non-final stage of the pipeline

Submitted by: pho
2014-11-03 21:21:08 +00:00
ngie
6d8b7cad33 Port h_hash and t_sha2 to FreeBSD
t_sha2 contains dirty copy-paste hacks that need to be fixed with the openssh
OpenBSD compat layer

Submitted by: pho
2014-11-01 22:00:46 +00:00
ngie
204692190e Expect :sscanf_whitespace to fail on !NetBSD OSes
Submitted by: pho
2014-11-01 21:30:18 +00:00
ngie
a139ef1078 Skip :fopen_regular on !NetBSD because it's a NetBSD specific test
Submitted by: pho
2014-11-01 21:25:22 +00:00
ngie
4a047d777b Add new atf_tc_expect_fail to fflush_err; this is a new (within the past couple months) bug 2014-11-01 21:23:27 +00:00
ngie
4625d6d956 Disable testcases 12 and 15-22 on FreeBSD
Submitted by: pho
2014-11-01 21:21:06 +00:00
ngie
54a2fbab7f Expect :snprintf_posarg_error to blow up with a SIGSEGV on !NetBSD OSes 2014-11-01 21:00:40 +00:00
ngie
224945e574 Port h_atexit to FreeBSD
__cxa_atexit varies between FreeBSD and NetBSD, and thus we must use pointers
instead of static fields in the BSS. More extensive discussion is included in
the source code

In collaboration with: kib
Submitted by: pho
2014-11-01 20:50:39 +00:00
ngie
d22d538f49 Port t_mincore to FreeBSD
Mark :mincore_resid as atf_tc_expect_fail on FreeBSD because of new bug
discovered in running the tests (it succeeded from earlier on in the year to
September/October on FreeBSD, at least)

Submitted by: pho
2014-11-01 20:45:45 +00:00
ngie
d38d28efa1 Port t_kevent to FreeBSD
Submitted by: pho
2014-11-01 20:41:40 +00:00
ngie
872d5cc719 Skip :sethostname_basic because it messes up the test host's hostname
Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__
2014-11-01 20:33:42 +00:00
ngie
7f45fd4285 getitimer on FreeBSD returns the last set time instead of the remaining time;
test for that instead

Submitted by: pho
2014-11-01 17:22:53 +00:00
ngie
4e2c8a8ae0 Port lib/libc/sys/t_dup to FreeBSD/Linux
- The requirements differ between FreeBSD/Linux when dealing with oldd/newd
  being equal (both fail with EINVAL, not EBADF)
- Add an EBADF testcase
- Fix compilation issues on clang

In collaboration with: pho
2014-11-01 17:19:43 +00:00
ngie
b50020b480 Port lib/libc/net/h_dns_server to FreeBSD
Submitted by: pho
2014-11-01 17:14:29 +00:00
ngie
04aa3b721d Port tests to FreeBSD/Linux
Some of the testcases don't work outside of NetBSD, and the behavior of
ether_aton_r differs between FreeBSD, Linux, and NetBSD, and the calls to the
API need to be massaged for FreeBSD and Linux.

Submitted by: pho
2014-11-01 17:13:13 +00:00
ngie
9e8b5d9f18 Don't prune duplicate services in the expected output from /etc/services on
FreeBSD

Submitted by: pho
2014-11-01 17:09:39 +00:00
jmmv
595e4e5bc7 Put mtree test files into a subdirectory.
Kyua 0.11 points TMPDIR to the test's work directory, and atf_check creates
auxiliary files in TMPDIR.  This confuses a couple of mtree tests that were
using the work directory's root to validate the contents of the directory.

Fix the two affected tests by creating an auxiliary directory to use for
the mtree tests.  (Kyua should probably do this on its own; filed bug #133
upstream to take a look at this.)
2014-11-01 11:07:59 +00:00
ngie
c84d9311b6 - Add sys/types.h for the APIs in sys/sysctl.h
- Poke at VM_MIN_ADDRESS in machine/vmparam.h because FreeBSD doesn't have a
  vm.minaddress sysctl analog
- Expect ENOMEM instead of EAGAIN in mlock_limits
- Provide mlock an mmap'ed page twice to simulate MAP_WIRED on NetBSD

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-24 16:18:16 +00:00
ngie
d67cf8ed8d Correct my previous commit:
- getrusage_utime_back succeeds reliably on FreeBSD
- getrusage_utime_zero passes/fails in a seemingly non-deterministic manner.
  Skip it for now (and fix it later)

In the initial port of this testcase to FreeBSD, the results failed reliably
in the same manner as it does on NetBSD

Sponsored by: EMC / Isilon Storage Division
2014-10-24 16:07:31 +00:00
ngie
233b531268 - Mark signo __unused in the signal handler function
- Effectively #if 0 out some code that does not fail on FreeBSD

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-24 06:57:16 +00:00
ngie
0bd1a4ddbf - Add inttypes.h and stdint.h in lieu of int_limits.h from NetBSD
- Use #include "h_macros.h" instead of relative path analog

Sponsored by: EMC / Isilon Storage Division
2014-10-24 06:53:06 +00:00
ngie
c0ab1074a0 - Test for EINVAL requirement when passing an invalid flag in to msync(2)
- Expect ENOMEM instead of EFAULT when msync'ing a previously munmap'ed region
  on FreeBSD

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-24 03:53:49 +00:00
ngie
043b7b066a - Ignore EINVAL check with mknod(path, S_IFCHR, -1) as the testcase is always
executed on a non-devfs filesystem
- Expect mknod(path, S_IFREG, 0) to fail on FreeBSD

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-24 03:42:37 +00:00
ngie
4c4ec283aa Omit the mprotect_exec testcase on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-23 08:29:09 +00:00
ngie
5911499dc8 Mark signum __unused
Sponsored by: EMC / Isilon Storage Division
2014-10-23 08:13:07 +00:00
ngie
2afcc40ccb Fix a typo (__FreeBSD__ -> __NetBSD__ when omitting setrlimit_nthr) 2014-10-23 08:12:31 +00:00
ngie
9b7dd77af4 Add limits.h #include for SSIZE_MAX
Sponsored by: EMC / Isilon Storage Division
2014-10-23 08:06:34 +00:00
ngie
18ff707cdd Add limits.h #include for SSIZE_MAX
Sponsored by: EMC / Isilon Storage Division
2014-10-23 08:05:47 +00:00
ngie
181c971463 - Omit setrlimit_nthr testcase on FreeBSD (requires lwp.h, et al)
- Expect overflow with rlim_max at INT64_MAX, not UINT64_MAX (rlim_t is int64_t
on FreeBSD)

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 08:05:03 +00:00
ngie
4062bfad9c - Mark sig/signo __unused
- Do not provide a relative path via #include "h_macros.h"

Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:59:59 +00:00
ngie
ef8a3be81f Use <atf_srcdir>/truncate_test.root_owned instead of /usr/bin/fpr as fpr does
not exist on FreeBSD

truncate_test.root_owned will be generated at build time and owned by root

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:54:46 +00:00
ngie
ef3a237704 Add limits.h #include for INT_MAX
Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:22:18 +00:00
ngie
b94c3058c5 - Omit the poll testcases on FreeBSD (they require pollts)
- Add necessary headers for the testcases

Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:20:35 +00:00
ngie
3dacc6b947 Mark signo __unused in handler(..)
Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:11:58 +00:00
ngie
063789a366 Omit all of the testcases as revoke(2) is only implemented on devfs(5)
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:07:35 +00:00
ngie
b7c71ae076 Omit the pollts testcases on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-23 07:05:14 +00:00
ngie
afc0360866 Port t_mmap.c to FreeBSD
- Add needed headers for the testcases
- Omit mmap_block on non-NetBSD OSes
- Use "security.bsd.map_at_zero" instead of "vm.user_va0_disable"

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:42:53 +00:00
ngie
0637f54796 Add sys/socket.h #include for struct sockaddr_in
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:35:19 +00:00
ngie
6b4654e75b Add limits.h #include for LINE_MAX
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:25:52 +00:00
ngie
9441ef13dc - Mark unused parameters __unused in handler
- Call sigqueue with getpid() instead of 0 -- the latter idiom appears to only
be valid on NetBSD

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:24:36 +00:00
ngie
67e9e5ed09 Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)"
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:21:10 +00:00
ngie
d50799c7c0 Port t_pipe2.c to FreeBSD
- Omit the pipe2_nosigpipe testcase on FreeBSD (FreeBSD doesn't have
  O_NOSIGPIPE).
- Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)".
- Save and restore the resource limit on the number of files (RLIMIT_NOFILE).

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 06:18:28 +00:00
ngie
a93e937947 Expect getgroups_err to fail on FreeBSD
PR: 189941
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2014-10-23 05:58:02 +00:00
ngie
b5892a07cc Add netinet/in.h for struct sockaddr_in
Sponsored by: EMC / Isilon Storage Division
2014-10-23 05:46:10 +00:00
ngie
100236adc1 Add sys/socket.h #include for bind(2), et al
Sponsored by: EMC / Isilon Storage Division
2014-10-21 20:17:05 +00:00
ngie
de5d2aed22 Port t_chroot to FreeBSD
- Add missing #include sys/stat.h for mkdir(2)
- Omit the fchroot(2) tests because the support is not present on FreeBSD

Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:10:05 +00:00
ngie
4407112560 unlink("/") fails with EISDIR instead of EBUSY on FreeBSD; test for that
instead

Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:06:04 +00:00
ngie
9502f96d3f Mark osi __unused so this compiles cleanly on FreeBSD
Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:01:37 +00:00
ngie
92b9a3b5f8 Port t_write to FreeBSD
- Mark the signo variable for the signal handle __unused
- Use limits.h instead of sys/syslimits.h (the latter does not
exist on FreeBSD)

Sponsored by: EMC / Isilon Storage Division
2014-10-21 18:00:55 +00:00
ngie
5ae76a2893 Add missing #include for sys/stat.h for fchmod
Sponsored by: EMC / Isilon Storage Division
2014-10-21 17:58:53 +00:00