Commit Graph

2011 Commits

Author SHA1 Message Date
brian
a33d520868 Add a Makefile for tools/regression/bin and support 'all' in
pax/Makefile.

MFC after:	3 weeks
2010-08-29 12:14:53 +00:00
brian
a8d67237e0 Correct an out-by-one error when earlying out ustar filenames that
are too long.  Filenames escaping this test are caught later on,
so the bug doesn't cause any breakage.

Document the correct ustar limitations in pax.  As I have no access
to the IEEE 1003.2 spec, I can only assume that the limitations
imposed are in fact correct.

Add regression tests for the filename limitations imposed by pax.

MFC after:	3 weeks
2010-08-29 11:56:56 +00:00
kib
5afcfa8055 Test the poll(2) return value.
MFC after:	2 weeks
2010-08-28 17:38:40 +00:00
gabor
415098b7a0 - Change default grep back to GNU version. BSD grep can be built with the
WITH_BSD_GREP knob.
- Bump __FreeBSD_version

Requested by:   dougb
Approved by:    delphij (mentor)
2010-08-23 10:04:26 +00:00
jilles
44306000bd sh: Remove remnants of '!!' to negate pattern.
This Almquist extension was disabled long ago.

In pathname generation, components starting with '!!' were treated as
containing wildcards, causing unnecessary readdir (which could fail, causing
pathname generation to fail while it should not).
2010-08-22 21:18:21 +00:00
jilles
bf52da60ea sh: Test that all bytes from 128 to 255 can be used in IFS.
To avoid multibyte issues, this test forces ISO8859-1 charset.

This also passes on stable/8.
2010-08-22 13:09:12 +00:00
jilles
a0dc7e84cf sh: Add a test for breaking from a loop outside the current function.
It is unwise to rely on this but I'd like to know if this would break.
2010-08-22 11:04:30 +00:00
rpaulo
1702ed2db3 Update for the new tests.
Sponsored by:	The FreeBSD Foundation
2010-08-21 14:14:24 +00:00
pjd
d2e0fb8db2 More tests. 2010-08-18 22:06:43 +00:00
jilles
28527a66ab sh: Add a test for break from a trap action. 2010-08-18 20:26:50 +00:00
kib
2c928d3c34 Add simple test to check the functioning of retrieval of
pagesize()/pagesizes() after change to use aux vector. Note that
public function getosreldate() is different from libc-internal
__getosreldate() and does not use aux to fetch osreldate value.

MFC after:	1 month
2010-08-17 09:42:50 +00:00
pjd
407c718f42 More tests, especially for lchown(2). 2010-08-17 06:08:09 +00:00
jilles
71f5d94974 sh: Reduce unnecessary testsuite failures with other shells. 2010-08-16 22:23:19 +00:00
jilles
f87a1a2d3e sh: Split off a more dubious test from parser/heredoc2.0. 2010-08-16 21:14:49 +00:00
jilles
81d99cf50d sh: Get rid of unnecessary non-standard empty lists.
POSIX does not allow constructs like:
  if cmd; then fi
  { }
Add a colon dummy command, except in a test that verifies that such empty
lists do not cause crashes when used as a function definition.
2010-08-16 17:18:08 +00:00
pjd
59ce935eae Finish renaming fstest to pjdfstest. 2010-08-15 21:29:03 +00:00
pjd
4a1c311f9e Give fstest a more unique name: pjdfstest.
It is released from time to time and used outside FreeBSD, so it is good to
have a name one can google.
2010-08-15 21:24:17 +00:00
pjd
d4c7d76723 Update copyright years. 2010-08-15 21:20:40 +00:00
pjd
7ec16847fb More tests. 2010-08-15 21:19:42 +00:00
jilles
0328c8f214 sh: Fix break/continue/return sometimes not skipping the rest of dot script.
In our implementation and most others, a break or continue in a dot script
can break or continue a loop outside the dot script. This should cause all
further commands in the dot script to be skipped. However, cmdloop() did not
know about this and continued to parse and execute commands from the dot
script.

As described in the man page, a return in a dot script in a function returns
from the function, not only from the dot script. There was a similar issue
as with break and continue. In various other shells, the return appears to
return from the dot script, but POSIX seems not very clear about this.
2010-08-15 21:06:53 +00:00
jilles
072152a8c4 sh: Test that all bytes from 1 to 127 can be used in IFS.
This also passes on stable/8.
2010-08-15 17:14:05 +00:00
pjd
03b315a9ca More tests (especially for lchmod(2)), less code duplication. 2010-08-15 14:44:48 +00:00
pjd
4d7d840be1 - Use loops to avoid code duplication.
- More tests.
2010-08-13 21:17:59 +00:00
pjd
66fa238445 More tests. 2010-08-12 20:35:14 +00:00
pjd
2ac8e0568d Portable Makefile. 2010-08-12 19:45:27 +00:00
pjd
60f714732b Fix copy&pasted code - we want to create character device here. 2010-08-12 19:43:40 +00:00
pjd
ac4d0fab5f - Use loops where possible to avoid code duplication.
- Don't pass uid and gid to create_file() if not needed.
- More tests.
2010-08-11 17:34:58 +00:00
pjd
510a3e5097 Allow to specify uid, gid and mode for create_file(). 2010-08-11 17:33:32 +00:00
mjacob
5688dd21e9 Consistently set us to be SPC3 for our inquiry data.
For mptest, add delays to I/O that simulate real disks better. This
also allows us to simulate what happens when a device goes away
with active transactions. It's pretty spectacular.

Sponsored by:	Panasas
MFC after:	1 month
2010-08-11 17:25:14 +00:00
pjd
e000343bcd More and more tests. 2010-08-11 16:34:44 +00:00
pjd
c6ffc68b54 Move create_file() to misc.sh, as it is going to be used in more places. 2010-08-11 16:34:26 +00:00
pjd
81f412d303 Make use of recently added dirgen_max() and namegen_max() to implement
ENAMETOOLONG checks.
2010-08-11 16:33:17 +00:00
pjd
286e5bb227 Instead of hardcoding {NAME_MAX} as 255 and {PATH_MAX} as 1024 obtain those from
pathconf(2) and properly generate too long file names.
This should fix ENAMETOOLONG checks on Linux.
2010-08-11 16:29:12 +00:00
pjd
8afd703de9 More tests, mostly related to devices and sockets. 2010-08-10 22:57:43 +00:00
jilles
8824c5ab76 sh: Fix heap-based buffer overflow in pathname generation.
The buffer for generated pathnames could be too small in some cases. It
happened to be always at least PATH_MAX long, so there was never an overflow
if the resulting pathnames would be usable.

This bug may be abused if a script subjects input from an untrusted source
to pathname generation, which a bad idea anyhow. Most shell scripts do not
work on untrusted data. secteam@ says no advisory is necessary.

PR:		bin/148733
Reported by:	Changming Sun snnn119 at gmail com
MFC after:	10 days
2010-08-10 22:45:59 +00:00
pjd
db2419320f Linux has no strlcpy(). 2010-08-09 20:16:52 +00:00
pjd
bf33fb9a4b Fix bind(2) and connect(2) support on Solaris. 2010-08-09 17:42:04 +00:00
pjd
20a20b3ca3 Fix file system type detection on Solaris. 2010-08-09 17:40:59 +00:00
pjd
b69af9bb70 Small tweaks. 2010-08-09 17:37:29 +00:00
pjd
a26561868e No need to use grep to check if path start with /.
Suggested by:	ed
2010-08-09 17:34:57 +00:00
mjacob
fcb0104482 Add a multipath oriented test. 2010-08-09 00:36:22 +00:00
jilles
f9b80b004e sh: Add more testcases for ${var:-word}.
Whether POSIX requires these is unclear.

They pass with 8-stable sh as well.
2010-08-08 17:03:23 +00:00
pjd
fb4dcd8fd5 Various cleanups, mostly to make the test work on FreeBSD/ZFS. 2010-08-06 23:58:54 +00:00
pjd
e7da3338b6 ${GREP} can only be used after loading 'conf'. 2010-08-06 21:58:53 +00:00
pjd
f87a4aad92 Don't use egrep directly - use ${GREP}. 2010-08-06 21:57:11 +00:00
pjd
970b3134a2 Check first todo() argument against operating system name and operating system
name plus file system name.
2010-08-06 21:56:32 +00:00
pjd
cf25be5f47 For FreeBSD and Linux use awk's toupper() function.
Suggested by:	ed
2010-08-06 21:53:50 +00:00
pjd
71f17c1253 Convert file system type to upper case. 2010-08-06 21:02:53 +00:00
pjd
0d945e4c12 Add tests for mknod(2).
Submitted by:	Jan Senolt <senoltj@centrum.cz>
Submitted by:	Milan Cermak <Milan.Cermak@Sun.COM>
Polished by:	pjd
2010-08-06 20:51:39 +00:00
pjd
3898aedc01 Add mknod(2) support.
Submitted by:	Jan Senolt <senoltj@centrum.cz>
Submitted by:	Milan Cermak <Milan.Cermak@Sun.COM>
2010-08-06 20:48:10 +00:00