Jilles Tjoelker
394357b2b6
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 Tjoelker
193da04bd8
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
Rui Paulo
7d924a46c2
Update for the new tests.
...
Sponsored by: The FreeBSD Foundation
2010-08-21 14:14:24 +00:00
Pawel Jakub Dawidek
af8ec89da4
More tests.
2010-08-18 22:06:43 +00:00
Jilles Tjoelker
44510b41ff
sh: Add a test for break from a trap action.
2010-08-18 20:26:50 +00:00
Konstantin Belousov
7ac7ad63d8
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
Pawel Jakub Dawidek
385cae0f8e
More tests, especially for lchown(2).
2010-08-17 06:08:09 +00:00
Jilles Tjoelker
7ba25e6e69
sh: Reduce unnecessary testsuite failures with other shells.
2010-08-16 22:23:19 +00:00
Jilles Tjoelker
2070b57f64
sh: Split off a more dubious test from parser/heredoc2.0.
2010-08-16 21:14:49 +00:00
Jilles Tjoelker
c06336d428
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
Pawel Jakub Dawidek
3618f38566
Finish renaming fstest to pjdfstest.
2010-08-15 21:29:03 +00:00
Pawel Jakub Dawidek
5a31155215
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
Pawel Jakub Dawidek
c6d1bc95b8
Update copyright years.
2010-08-15 21:20:40 +00:00
Pawel Jakub Dawidek
af2ec7ee6b
More tests.
2010-08-15 21:19:42 +00:00
Jilles Tjoelker
ae7c0700dc
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 Tjoelker
a129ce0167
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
Pawel Jakub Dawidek
6d4317a1e4
More tests (especially for lchmod(2)), less code duplication.
2010-08-15 14:44:48 +00:00
Pawel Jakub Dawidek
ea9ba9fe93
- Use loops to avoid code duplication.
...
- More tests.
2010-08-13 21:17:59 +00:00
Pawel Jakub Dawidek
5b2bae575b
More tests.
2010-08-12 20:35:14 +00:00
Pawel Jakub Dawidek
af7198501c
Portable Makefile.
2010-08-12 19:45:27 +00:00
Pawel Jakub Dawidek
d4f106bd86
Fix copy&pasted code - we want to create character device here.
2010-08-12 19:43:40 +00:00
Pawel Jakub Dawidek
d999d7ae4f
- 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
Pawel Jakub Dawidek
8db93ae7d4
Allow to specify uid, gid and mode for create_file().
2010-08-11 17:33:32 +00:00
Matt Jacob
288f3fd63a
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
Pawel Jakub Dawidek
0cc88f266d
More and more tests.
2010-08-11 16:34:44 +00:00
Pawel Jakub Dawidek
35f540a74b
Move create_file() to misc.sh, as it is going to be used in more places.
2010-08-11 16:34:26 +00:00
Pawel Jakub Dawidek
5ad80c5727
Make use of recently added dirgen_max() and namegen_max() to implement
...
ENAMETOOLONG checks.
2010-08-11 16:33:17 +00:00
Pawel Jakub Dawidek
1d6b6a46d7
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
Pawel Jakub Dawidek
828160e93c
More tests, mostly related to devices and sockets.
2010-08-10 22:57:43 +00:00
Jilles Tjoelker
c8a3d81f34
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
Pawel Jakub Dawidek
6a4e10db54
Linux has no strlcpy().
2010-08-09 20:16:52 +00:00
Pawel Jakub Dawidek
ef01b5b762
Fix bind(2) and connect(2) support on Solaris.
2010-08-09 17:42:04 +00:00
Pawel Jakub Dawidek
57ab39b94a
Fix file system type detection on Solaris.
2010-08-09 17:40:59 +00:00
Pawel Jakub Dawidek
cd9b233e0a
Small tweaks.
2010-08-09 17:37:29 +00:00
Pawel Jakub Dawidek
4b9cdebd26
No need to use grep to check if path start with /.
...
Suggested by: ed
2010-08-09 17:34:57 +00:00
Matt Jacob
a55e712763
Add a multipath oriented test.
2010-08-09 00:36:22 +00:00
Jilles Tjoelker
40d2ccc36f
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
Pawel Jakub Dawidek
6a8ecf4c59
Various cleanups, mostly to make the test work on FreeBSD/ZFS.
2010-08-06 23:58:54 +00:00
Pawel Jakub Dawidek
f8287aa0ac
${GREP} can only be used after loading 'conf'.
2010-08-06 21:58:53 +00:00
Pawel Jakub Dawidek
8f3ff75868
Don't use egrep directly - use ${GREP}.
2010-08-06 21:57:11 +00:00
Pawel Jakub Dawidek
3556206aad
Check first todo() argument against operating system name and operating system
...
name plus file system name.
2010-08-06 21:56:32 +00:00
Pawel Jakub Dawidek
520fad0247
For FreeBSD and Linux use awk's toupper() function.
...
Suggested by: ed
2010-08-06 21:53:50 +00:00
Pawel Jakub Dawidek
f7bfc405c7
Convert file system type to upper case.
2010-08-06 21:02:53 +00:00
Pawel Jakub Dawidek
bbbc67e6ff
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
Pawel Jakub Dawidek
ce29a12f91
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
Pawel Jakub Dawidek
c9ea9723b0
Sort includes.
2010-08-06 20:46:26 +00:00
Pawel Jakub Dawidek
6c4a79e1b1
open(2) returns EOPNOTSUPP when trying to open a socket.
2010-08-06 19:22:42 +00:00
Pawel Jakub Dawidek
ce2decb660
Test for EACCES also when opening FIFO or directory.
2010-08-06 19:20:35 +00:00
Pawel Jakub Dawidek
482fdb1334
Test O_RDONLY|O_RDWR flags as potentially invalid.
2010-08-06 19:19:14 +00:00
Pawel Jakub Dawidek
adab8b00ab
Make description readable.
2010-08-06 19:18:19 +00:00