Commit Graph

1076 Commits

Author SHA1 Message Date
Eitan Adler
fbc88a6f35 sponge(1): revert
I did a complete buildworld and test... with the program disconnected
from the tree. Revert the change for now.

(this keeps the change to .arclint which is still correct)

Wearing:	my pointhat
2017-12-06 02:47:46 +00:00
Eitan Adler
8d4a7aab40 sponge(1): fix my tests
Reviewed by:	kevans
2017-12-05 04:43:39 +00:00
Alan Somers
95639a80ef dc(1): fix input of non-decimal fractional numbers
Inputting fractional non-decimal numbers has never worked correctly in our
OpenBSD-derived dc(1). It truncates the input to a number of decimal places
equal to the number of hexadecimal (or whatever base) places given on the
input. That's unacceptable, because many numbers require more precision to
represent in base 10 than in their original bases.

Fix this bug by using as many decimal places as needed to represent the
input, up to the maximum of the global scale factor.

This has one mildly surprising side effect: the scale of a number entered in
non-decimal mode will no longer necessarily equal the number of hexadecimal
(or whatever base) places given on the input. I think that's an acceptable
behavior change, given that inputting fractional non-decimal numbers never
worked in the first place, and the man page doesn't specify whether trailing
zeros on the input should affect a number's scale.

PR:		206230
Reported by:	nibbana@gmx.us
Reviewed by:	pfg
Differential Revision:	https://reviews.freebsd.org/D13336
2017-12-05 04:22:35 +00:00
Mark Johnston
04006780d9 Complete support for dtrace's -x setenv option.
This allows one to override the environment for processes created with
dtrace -c. By default, the environment is inherited.

This support was originally merged from illumos in r249367 but was lost
when the commit was later reverted and then brought back piecemeal.

Reported by:	Samuel Lepetit <slepetit@apple.com>
MFC after:	2 weeks
2017-12-03 16:57:28 +00:00
Kristof Provost
4fbebc7472 Add IPSec tests in tunnel mode
Some IPSec in tunnel mode allowing to test multiple IPSec
configurations.  These tests are reusing the jail/vnet scripts from pf
tests for generating complex network.

Submitted by:	olivier@
Differential Revision:	https://reviews.freebsd.org/D13017
2017-12-03 13:52:35 +00:00
Dimitry Andric
d4419f6fa8 Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch.  This corresponds to 5.0.1 rc2.

MFC after:	2 weeks
2017-12-03 12:14:34 +00:00
Alan Somers
013953eb5f Add basic tests for ctfconvert(1), fold(1) and rs(1)
Add basic command line parsing test coverage for these utilities.  The tests
were automatically generated based on their man pages.  These tests can be
expanded by hand for more thorough coverage.  The aim is to generate very
basic amount of test coverage for all the utilities in the base system.

Tests generated via: https://github.com/shivansh/smoketestsuite/

Submitted by:	shivansh
Reviewed by:	asomers
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D12424
2017-11-27 20:01:58 +00:00
Alan Somers
396c556d77 Add ATF tests for head(1)
Submitted by:	Fred Schlecter <https://github.com/fjs-github>
Reviewed by:	asomers, jilles
MFC after:	3 weeks
Differential Revision:	https://github.com/freebsd/freebsd/pull/127
2017-11-20 22:55:02 +00:00
Konstantin Belousov
9898800172 Remove xlint(1).
xlint is currently a fossil.  We have much more useful and alive tools
to do now what xlint did twenty years ago.

I did not cleared some stuff which makes lint operational, in
sys/x86/include and sys/sys, but I might do it as followup.  The
x86/include/ucontext.h and _types.h hacks made to please lint was the
main reason for my initial proposal to classify xlint as obsolete and
to remove it.

Also I do not intend to clear sccs ids.

Reviewed by:	bapt, brooks, emaste, jhb, pfg
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D13015
2017-11-16 14:37:18 +00:00
Bryan Drewery
939d033cab Disconnect libpathconv tests since they require external perl and do not work with kyua.
This reverts r325192 and is due to libpathconv being connected in r325186.

Reported by:	ngie
Sponsored by:	Dell EMC Isilon
2017-10-31 19:52:30 +00:00
Bryan Drewery
ae160963d8 Fix installworld/distrib-dirs for pathconv after r325186.
Sponsored by:	Dell EMC Isilon
2017-10-31 01:43:36 +00:00
Kristof Provost
1d6f5f214a pf: Basic automated test using VIMAGE
If VIMAGE is present we can start jails with their own pf instance. This
makes it fairly easy to run tests.
For example, this basic test verifies that drop/pass and icmp
classification works. It's a basic sanity test for pf, and hopefully an
example on how to write more pf tests.

The tests are skipped if VIMAGE is not enabled.

This work is inspired by the GSoC work of Panagiotes Mousikides.

Differential Revision:	https://reviews.freebsd.org/D12580
2017-10-06 20:43:14 +00:00
Jeremie Le Hen
e415aa2846 Remove rcmds.
If they are still needed, you can find them in the net/bsdrcmds port.

This was proposed June, 20th and approved by various committers [1].
They have been marked as deprecated on CURRENT in r320644 [2] on July, 4th.
Both stable/11 and release/11.1 contain the deprecation notice (thanks to
allanjude@).

Note that ruptime(1)/rwho(1)/rwhod(8) were initially thought to be part of
rcmds but this was a mistake and those are therefore NOT removed.

[1] https://lists.freebsd.org/pipermail/freebsd-arch/2017-June/018239.html
[2] https://svnweb.freebsd.org/base?view=revision&revision=320644

Reviewed by:	bapt, brooks
Differential Revision:	https://reviews.freebsd.org/D12573
2017-10-06 08:43:14 +00:00
Baptiste Daroussin
e6340c5d05 Remove unneeded locales and alias man directories
In base, locales (and encoding) specific directories are not used
by any tool. Just remove them.

While here also remove the cat page directory for openssl
2017-09-26 05:43:55 +00:00
Baptiste Daroussin
05572d356b Remove the cat pages directory now that catman(1) is gone 2017-09-25 21:23:49 +00:00
Alan Somers
014404db1a Add basic tests for chflags, mkdir, rcp, and rmdir
Add basic command line parsing test coverage for these utilities.  The tests
were automatically generated based on their man pages.  These tests can be
expanded by hand for more thorough coverage.  The aim is to generate very
basic amount of test coverage for all the utilities in the base system.

Submitted by:	shivansh
Reviewed by:	asomers, brooks
MFC after:	3 weeks
Sponsored by:	Google, Inc (GSoC 2017)
Differential Revision:	https://reviews.freebsd.org/D12036
2017-09-07 16:54:47 +00:00
Jilles Tjoelker
2cc32af06f sh: Add tests for sh -c that already pass.
PR:		220587
Submitted by:	Ryan Moeller
2017-08-12 19:17:48 +00:00
Enji Cooper
fcb60eb0bb Unconditionally install etc/mtree/BSD.debug.dist again
r279248 unconditionally installed BSD.debug.dist for ease-of-developer-use.
Restore the previous behavior.

While here, add a comment to note that this is intentional to avoid accidental
future removal.

MFC after:	2 months
MFC with:	r321444
2017-07-25 00:28:23 +00:00
Dimitry Andric
2fef18f836 Merge ^/head r320994 through r321238. 2017-07-19 19:43:10 +00:00
Kristof Provost
4d7709ddf6 pfctl parser tests
Copy the most important test cases from OpenBSD's corresponding
src/regress/sbin/pfctl, those that run pfctl on a test input file and check
correctness of its output. We have also added some new tests using the same
format.

The tests consist of a collection of input files (pf*.in) and
corresponding output files (pf*.ok). We run pfctl -nv on the input
files and check that the output matches the output files. If any
discrepancy is discovered during future development in the source
tree, we know that a regression bug has been introduced into the tree.

Submitted by:	paggas
Sponsored by:	Google, Inc (GSoC 2017)
Differential Revision:	https://reviews.freebsd.org/D11322
2017-07-15 19:22:01 +00:00
Dimitry Andric
d2043ca373 Merge ^/head r320573 through r320970. 2017-07-13 22:01:38 +00:00
Kyle Evans
b5ddde39ac Add some basic tests for hexdump(1)'s various output flags. Formatting
tests are omitted for this initial run as there are still some bugs to work
out there.

This covers -s flag testing on devices and non-devices that would have
caught breakage found in PR 219173 as well as other subtle breakage caused
locally.

Reviewed by:	cem, ngie
Approved by:	cem (acting co-mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D11279
2017-07-13 03:52:54 +00:00
Warner Losh
a94a63f0a6 An MMC/SD/SDIO stack using CAM
Implement the MMC/SD/SDIO protocol within a CAM framework. CAM's
flexible queueing will make it easier to write non-storage drivers
than the legacy stack. SDIO drivers from both the kernel and as
userland daemons are possible, though much of that functionality will
come later.

Some of the CAM integration isn't complete (there are sleeps in the
device probe state machine, for example), but those minor issues can
be improved in-tree more easily than out of tree and shouldn't gate
progress on other fronts. Appologies to reviews if specific items
have been overlooked.

Submitted by: Ilya Bakulin
Reviewed by: emaste, imp, mav, adrian, ian
Differential Review: https://reviews.freebsd.org/D4761

merge with first commit, various compile hacks.
2017-07-09 16:57:24 +00:00
Enji Cooper
f37852c173 Add tests to help verify Links functionality for .../contrib/tzdata/backwards
MFC after:	1 month
MFC with:	r320702
2017-07-06 04:30:06 +00:00
Ed Maste
8fadf6a637 cam: EOL whitespace cleanup and line wrapping changes
NFC. This cleanup simplifies diffs for review of the MMC-CAM work.

Submitted by:	kibab
2017-07-04 18:48:08 +00:00
Dimitry Andric
f6e653bb10 Merge ^/head r320398 through r320572. 2017-07-02 11:48:07 +00:00
Enji Cooper
3416500aef Pull down pjdfstest 0.1
The summary of changes is as follows..

Generic changes::
- Added configure support [2].
- Check for lchmod filesystem support with create_file(..); for
  testcases that require lchmod, skip the testcase -- otherwise
  use chmod directly [1].
- Added Travis CI integration [2].
- Added utimensat testcases [1].

Linux support::
- Fixed Linux support to pass on later supported versions of
  Fedora/Ubuntu [2].
- Conditionally enable posix_fallocate(2) support [2].

OSX support::
- Fixed compilation on OSX [2].
- Added partial OSX support (the test run isn't fully green yet)
  [2].

MFC after:	2 months
Obtained from:	https://github.com/pjd/pjdfstest/tree/0.1
Relnotes:	yes
Submitted by:	asomers [1], ngie [2]
Tested with:	UFS, ZFS
2017-06-28 09:22:45 +00:00
Enji Cooper
de1abb9778 Commit the corresponding mtree file change for the TAP test examples
MFC after:	1 month
MFC with:	r320443
2017-06-28 08:23:20 +00:00
Dimitry Andric
4198293b25 Merge ^/head r319801 through r320041. 2017-06-17 00:14:54 +00:00
Enji Cooper
74c9a5910c Add some initial basic tests for du(1)
Tests that exercise the following flags are added in this commit:
- -A
- -H
- -I
- -g
- -h
- -k
- -m

Additional tests will be added soon.

MFC after:	1 month
2017-06-12 07:43:58 +00:00
Enji Cooper
21860bf938 Write up some basic tests for readlink(1)
The tests exercise -f (f_flag), -n (n_flag), and no arguments (basic).

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-06-11 21:13:12 +00:00
Dimitry Andric
686fb94a00 Merge ^/head r319548 through r319778. 2017-06-10 13:22:49 +00:00
Alan Somers
670f178299 Add tests for ln(1)
* Verify that when creating a hard link to a symbolic link, '-L' option
  creates a hard link to the target of the symbolic link
* Verify that when creating a hard link to a symbolic link, '-P' option
  creates a hard link to the symbolic link itself
* Verify that if the target file already exists, '-f' option unlinks it so
  that link may occur
* Verify that if the target file or directory is a symbolic link, '-shf'
  option prevents following the link
* Verify that if the target file or directory is a symbolic link, '-snf'
  option prevents following the link
* Verify that '-s' option creates a symbolic link
* Verify that '-w' option produces a warning if the source of a symbolic
  link does not currently exist

Submitted by:	shivansh
Reviewed by:	asomers, ngie
MFC after:	1 month
Sponsored by:	Google, Inc (GSoC 2017)
Differential Revision:	https://reviews.freebsd.org/D11084
2017-06-08 19:09:55 +00:00
Baptiste Daroussin
9a4d69e3aa Remove directories for the roff documentations which is built and installed
anymore

Reported by:	trasz
2017-06-08 01:41:20 +00:00
Baptiste Daroussin
738919c039 Remove groff from base
All manpages in base are now compatible with mandoc(1), all roff documentation
will be relocated in the doc tree. man(1) can now use groff from the ports tree
if it needs.

Also remove checknr(1) and colcrt(1) which are only useful with groff.

Approved by:	(no objections on the mailing lists)
2017-06-07 23:00:34 +00:00
Enji Cooper
245e210cc6 Add some basic tests for chmod(1)
MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-06-07 05:33:56 +00:00
Enji Cooper
2d15c3cb12 Add basic tests for echo(1)
Verify that echo(1) does not...
- ... print the trailing newline character with option '-n'.
- ... print the trailing newline character when '\c' is appended to
      the end of the string.

Submitted by:	shivansh
Reviewed by:	asomers, ngie
MFC after:	1 month
Sponsored by:	Google, Inc (GSoC 2017)
Differential Revision:	D11036
2017-06-06 16:04:27 +00:00
Dimitry Andric
d02c951f8e Merge ^/head r318658 through r318963. 2017-05-26 19:11:24 +00:00
Edward Tomasz Napierala
85a4f37a3a Create /net by default, for autofs.
MFC after:	2 weeks
2017-05-25 08:34:24 +00:00
Dimitry Andric
27c240688c Merge ^/head r318560 through r318657. 2017-05-22 19:28:24 +00:00
Jilles Tjoelker
fd1c67ef4e compress: Add basic tests. 2017-05-21 14:05:32 +00:00
Dimitry Andric
775e1e023f After r317383 (removal of NATM), also remove usr/include/dev/utopia from
BSD.include.dist.
2017-05-20 11:40:37 +00:00
Dimitry Andric
ea1e967cbf Merge ^/head r318380 through r318559. 2017-05-19 21:20:01 +00:00
Enji Cooper
20d90b10b1 usr.bin/getconf: add some initial tests
Items tested via this commit are:
- Some basic POSIX constants.
- Some valid programming environments with -v.
- Some invalid programming environments via -v.

NOTE: this test makes assumptions about ILP32/LP32 vs LP64 that are
currently not true on all architectures to avoid hardcoding some
architectures in the tests. I'm working on improving getconf(1) to be
more sane about handling ILP32/LP32 vs LP64. Future commits are coming
soon to address this.

MFC after:	2 weeks
Tested with:	amd64, i386
Sponsored by:	Dell EMC Isilon
2017-05-18 01:43:30 +00:00
Dimitry Andric
209be20560 Merge ^/head r317971 through r318379. 2017-05-16 19:54:47 +00:00
Enji Cooper
c7d813a93e Start writing up some basic feature tests for procstat
These tests query a running process for information related to the -b,
-c, -e, and -f flags; the -f testcase is largely stubbed out, pending
additional work to determine a good, deterministic descriptor.

Core file test support is coming soon--it requires a bit more effort
due to the fact that:
- coredumps can be disabled (kern.coredump=0).
- corefiles can be put in different directories than the current
  directory, or be named something other than `<prog>.core`
  (`kern.corefile`).

MFC after:	2 months
Sponsored by:	Dell EMC Isilon
2017-05-15 22:52:25 +00:00
Dimitry Andric
7e1b7636c8 Merge ^/head r317808 through r317970. 2017-05-08 19:27:44 +00:00
Enji Cooper
c53d56999c Fix the build after r317942 by adding usr.bin/csplit to BSD.tests.dist
Pointyhat to:	cem
MFC with:	r317942
Sponsored by:	Dell EMC Isilon
2017-05-08 17:13:00 +00:00
Dimitry Andric
af3f36025b Merge ^/head r317281 through r317502. 2017-04-27 12:59:14 +00:00
Brooks Davis
a7dc31283a Remove the NATM framework including the en(4), fatm(4), hatm(4), and
patm(4) devices.

Maintaining an address family and framework has real costs when we make
infrastructure improvements.  In the case of NATM we support no devices
manufactured in the last 20 years and some will not even work in modern
motherboards (some newer devices that patm(4) could be updated to
support apparently exist, but we do not currently have support).

With this change, support remains for some netgraph modules that don't
require NATM support code. It is unclear if all these should remain,
though ng_atmllc certainly stands alone.

Note well: FreeBSD 11 supports NATM and will continue to do so until at
least September 30, 2021.  Improvements to the code in FreeBSD 11 are
certainly welcome.

Reviewed by:	philip
Approved by:	harti
2017-04-24 21:21:49 +00:00