Commit Graph

3804 Commits

Author SHA1 Message Date
Enji Cooper
f4ce06a920 Fix -Wunused warning with clang/gcc
- Get rid of unused argc/argv variables in main
- Bump WARNS to 6

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2016-01-16 02:19:56 +00:00
Enji Cooper
cc67e311d5 Fix warnings with clang/gcc
- Get rid of unused argc/argv variables in main
- Exit on failure with a return code of 1 instead of -1 with err/errx as a
  return code of -1 is implementation dependent
- Bump WARNS to 6

MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division
2016-01-16 02:18:36 +00:00
Enji Cooper
eb1c509ffd Fix warnings with gcc 5.0
reconnect.c:
- Convert the K&R prototype of main to an ANSI prototype to mute a
  warning from gcc 4.2.1
- Close s_sock2 after finishing off the last test to plug a leak and
  mute a warning from gcc 5.0 about a -Wunused-but-set variable

sendfile.c:
- Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)

MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division
2016-01-16 02:15:13 +00:00
Enji Cooper
c084ac2883 Test for EPROTOTYPE not EPROTONOSUPPORT
- `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4)
- localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so
  the prototype is invalid (this isn't explicitly documented anywhere I could
  find)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-01-16 02:02:50 +00:00
Enji Cooper
7c5cecc0f9 Add missing newline to message about requiring root privileges
This will help ensure that scripts/parsers don't get confused when the message
is printed out

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2016-01-16 01:37:17 +00:00
Enji Cooper
0e47853e87 - Check for accf_filter before running the tests, otherwise it will always
fail at subtest 9/11
- Use strncpy instead of strcpy with afa.af_name
2016-01-15 21:59:18 +00:00
Enji Cooper
09d986419d Integrate
tools/regression/geom_{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}
in to the FreeBSD test suite as
tests/sys/geom/class/{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}

The tools/regression/geom and tools/regression/geom_part testcases are being
left alone because both test sets are both currently broken.

The majority of this work was done on ^/user/ngie/more-tests2 . The differences
are as follows:
- tests/sys/geom/class/Makefile.inc is not present; it was
  inlined into the class's Makefiles for explicitness.
- The testcases officially require root via kyua
- The geom_gate(4) tests don't use the pidfile changes proposed in
  https://reviews.freebsd.org/D4836 .

MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
2016-01-13 09:14:27 +00:00
Enji Cooper
7de2d9ec2f Add conf.sh file missed in r293621
MFC after: 16 days
Sponsored by: EMC / Isilon Storage Division
2016-01-13 07:31:59 +00:00
Enji Cooper
8084a52400 Remove Makefile now that the testcases are all TAP based and
prove -rv can be used on them

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-09 23:46:52 +00:00
Enji Cooper
0f0306933a - Delete non-TAP testcases
- Add a conf.sh file for executing common functions with geom_gate
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox
- Add/increase sleeps to try and improve synchronization
- Add debug output for when checksums fail

test-1.t:
- Use pkill for killing ggated

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-09 23:45:25 +00:00
Ed Maste
b80f3546a8 Support use of LLVM's libunwind for exception unwinding
It is built in libgcc_s.so and libgcc_eh.a to simplify transition.

It is enabled by default on arm64 (where we previously had no other
unwinder) and may be enabled for testing on other platforms by setting
WITH_LLVM_LIBUNWIND in src.conf(5).

Also add compiler-rt's __gcc_personality_v0 implementation for use with
the LLVM unwinder.

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4787
2016-01-09 00:42:07 +00:00
Enji Cooper
f009f68a21 - Move functions that might be used in class-specific cleanup functions
(geom_test_cleanup, etc) down so the testcases don't emit noise when
  bailing
- Conform to the TAP protocol better when dealing with classes that can't
  be loaded and with temporary files that can't be allocated for tracking
  md(4) devices.

MFC after: 2 weeks
X-MFC with: r293028, r293029, r293048
Sponsored by: EMC / Isilon Storage Division
2016-01-08 21:47:41 +00:00
Enji Cooper
eb028f7b2d - Make test-1.sh into a TAP testable testcase
- Delete test-2.sh as it was an incomplete testcase, and the contents were
  basically a subset of test-1.sh
- Add a conf.sh file for executing common functions with geom_uzip
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 21:38:26 +00:00
Enji Cooper
b8338417d2 - Add a geom_stripe specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 21:28:09 +00:00
Enji Cooper
67c3cb72da - Add a geom_shsec specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 21:25:27 +00:00
Enji Cooper
5f119e8d13 - Add a geom_raid3 specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 19:47:49 +00:00
Enji Cooper
72670c33c2 - Add a conf.sh file for executing common functions with gnop
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 19:43:18 +00:00
Enji Cooper
06908bcb39 - Add a conf.sh file for executing common functions with geli
-- Use linear probing to find the first unique md(4) device, unlike the other
   code which uses attach_md, as geli(8) allocates the md(4) devices itself
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 19:38:59 +00:00
Enji Cooper
6b2f497e48 - Use attach_md for memory disks so they can be tracked.
- Add a geom_concat specific cleanup function and trap on that function at
  exit so things are cleaned up properly
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 19:10:52 +00:00
Warner Losh
45b2ffd09e Make sure that the /set directive gets put at the top of the file,
instead of in sort order. Slash sorts after period.
2016-01-08 00:05:47 +00:00
Warner Losh
d83ed77082 Setup /pkg as a spot for pkg to operate. This is for testing purposes
only. You need to remount / rw and export TMPDIR=/pkg/tmp. pkg will
then work. It's slow though: 15 minutes to pkg install git on an RPi 2
with a decently fast SD card. Since this is for testing, we set
DEFAULT_ALWAYS_YES and ASSUME_ALWAYS_YES to YES.
2016-01-08 00:05:28 +00:00
Renato Botelho
f5b4d34104 Obsolete inetd related files when WITHOUT_INETD is set
Reviewed by:	bapt
Approved by:	gnn
MFC after:	1 week
Sponsored by:	Rubiconn Communications (Netgate)
Differential Revision:	https://reviews.freebsd.org/D4742
2016-01-07 20:37:18 +00:00
Enji Cooper
86e3671a7e - Use attach_md instead of hardcoding md(4) provider unit numbers
- Implement a gmirror_test_cleanup function, which in turn calls
  geom_test_cleanup to clean up all md(4) providers allocated in the test
  run.
- Remove duplicate logic in test scripts for removing md(4) providers.
- Don't create files in /tmp (outside the kyua sandbox); use the current
  directory instead

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-03 06:02:56 +00:00
Enji Cooper
e50b18a333 - Use a temporary file for the temporary md(4) devices instead of
hardcoding it
- Remove the temporary file in the cleanup routine

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-02 10:07:31 +00:00
Enji Cooper
92a889c673 Use randomly generated device names in testcases via mktemp -u instead of using
the hardcoded device name, "test"

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-01 03:12:51 +00:00
Enji Cooper
18e6b1b067 Add functions for managing md(4) devices and cleaning up said md(4) devices
These will be used soon in the various test scripts that source geom_subr.sh

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-01 02:25:10 +00:00
Enji Cooper
cad12e04c6 - Use geom <class> load instead of g<class> load; g<class> doesn't exist
for all geom classes, e.g. geom_uzip(4)
- These tests require root. Skip all of the tests if they're run as non-root

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-01 02:22:45 +00:00
Enji Cooper
b9083c2190 Integrate tools/regression/sockets/unix_passfd into the FreeBSD test
suite as tests/sys/kern/unix_passfd_test

- Convert testcases to ATF
- Fix an alignment issues
- Mark rights_creds_payload(..) as an expected failure (see PR # 181741)

Based [in part] on the following Differential Revision:
https://reviews.freebsd.org/D689

MFC after: 1 week
Submitted by: markj
Sponsored by: EMC / Isilon Storage Division
2015-12-30 11:15:07 +00:00
Enji Cooper
f3b9984bce - Explicitly initialize ch to 0
- Delete some spurious whitespace
- Use calloc instead of malloc in the last test to ensure that
  sendspace is properly zero'ed out

Differential Revision: https://reviews.freebsd.org/D689 (part of a larger diff)
MFC after: 1 week
Reviewed by: asomers, ngie
Submitted by: markj
Sponsored by: EMC / Isilon Storage Division
2015-12-28 00:53:37 +00:00
Warner Losh
728a116911 There's currently some issues with armv7-class of CPUs code generation
with our default toolchain. Turn it off here until that all gets
sorted out.
2015-12-27 23:04:10 +00:00
Dimitry Andric
9a4b31181f Upgrade our copies of clang and llvm to 3.7.1 release. This is a
bugfix-only release, with no new features.

Please note that from 3.5.0 onwards, clang and llvm require C++11
support to build; see UPDATING for more information.
2015-12-25 21:39:45 +00:00
Dimitry Andric
2fe5752e3a Import llvm 3.7.1 release (r255217). 2015-12-25 14:25:49 +00:00
Warner Losh
3526f66fc2 Add quotes to prevent syntax errors on boot. 1.freebsd.pool.ntp.org
isn't a very popular command :)
2015-12-24 02:02:05 +00:00
Warner Losh
6e0601e970 Move creation of rc.conf to earlier so it winds up in /conf/boot/etc
With this change we mostly boot w/o errors on RPi-B for an
image cross built w/o privs. Other systems to follow.

Release Notes: Yes
2015-12-24 01:48:40 +00:00
Ed Maste
e7beaf9968 Install ld also as ld.bfd, for use with cc -fuse-ld=bfd
PR:		205409 [exp-run]
MFC after:	1 week
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2015-12-23 14:31:26 +00:00
Warner Losh
4e8617b60f Touch /firstboot in the WORLDDIR. 2015-12-23 06:49:28 +00:00
Warner Losh
14b4a9e030 Copy all the dtb files that we build as part of the kernel build from
boot/dtb to the fat partition. They seem to be needed.
Create an empty uEnv.txt file
2015-12-23 06:49:18 +00:00
Warner Losh
cf296cf3d7 Delete the DOS dir to mirror what we do with NANO_WORLDDIR.
Copy ubldr and ubldr.bin to the dos partition when we're making it.
Minor style fixes.
2015-12-22 19:40:34 +00:00
Warner Losh
730acac20c For embedded platforms that require it, use mtools to copy the
appropriate u-boot port's files into the fat part.
2015-12-22 06:36:00 +00:00
Enji Cooper
870c2f7af9 Integrate tools/regression/mac/mac_bsdextended and
tools/regression/mac/mac_portacl into the FreeBSD test suite as
tests/sys/mac/bsdextended and tests/sys/mac/portacl, respectively

MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
2015-12-21 21:24:03 +00:00
Enji Cooper
1dc3084804 Make the mac_portacl testcases work / more robust
- A trap(1) call has been added to the test scripts to better
  ensure that the tests do a better job at trying to restore the
  test host state at the end of the tests (if the test was
  interrupted before it would leave the system in an odd state,
  potentially making the test results for subsequent runs
  non-deterministic).
- Add root user checks
- Fix nc(1) usage:
  -- -o is deprecated
  -- Using `-w 10` will make the call timeout after 10 seconds so it
     doesn't block indefinitely
- Use local variables
- Be more terse in the error messages
- Parameterize out "127.0.0.1"

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-12-21 21:15:23 +00:00
Enji Cooper
9b6e69c757 - Convert testcase to TAP format
- Use nitems(x) instead of handrolled sizeof(x) / sizeof(*x) macro
- Do not mark count != 0 case with bsde_get_rule_count as a failure; this
  generates false positives on systems with ugidfw rules set on it

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-12-21 12:43:04 +00:00
Enji Cooper
f1c6f7e2d7 Redo the TAP integration so it works with Kyua
Kyua needs numbers in the TAP results :/, but prove doesn't

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-12-21 12:39:16 +00:00
Enji Cooper
8304a7b913 Skip the testcases if mac_bsdextended(4) isn't detected on the
system

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-12-21 08:58:14 +00:00
Enji Cooper
f33a82e070 Mark subject matching jailid testcase as an unexpected failure with
TODO to ensure that the testcase isn't marked as a failure

PR: 205481
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-12-21 08:53:26 +00:00
Enji Cooper
5f249cb8c9 Make test_matches.sh into a series of TAP testcases
Use temporary filesystems / memory disks instead of a hardcoded path
which doesn't exist on test systems

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-12-21 08:14:45 +00:00
Enji Cooper
7b98ae5ad2 - Use 1 for an exit code instead of -1 with err, errx, and exit
- Add unistd.h for getuid(3)
- Sort #includes

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-12-21 07:04:01 +00:00
Warner Losh
17df9f4dcf There's no such program as [-n :(. Add the missing space. Also,
work when the object directory doesn't exist yet. realpath hates
us, so use the backup of the realpath arg when that happens.
2015-12-21 05:08:20 +00:00
Hajimu UMEMOTO
7f7cd1d54c Restore a day of the week in date(1) output for Japanese locales.
It was lost by recent locale change.
2015-12-20 14:59:30 +00:00
Enji Cooper
8a7d0e8ce3 Integrate the remaining tools/regression/lib/msun testcases into the
FreeBSD test suite under lib/msun/tests

MFC after: 3 weeks
X-MFC with: r292328
Sponsored by: EMC / Isilon Storage Division
2015-12-20 05:06:44 +00:00