| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes: d0b2dbfa0ecf ("Remove $FreeBSD$: one-line sh pattern")
|
|
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
|
|
|
|
|
|
|
| |
This is to avoid loading .shrc which may contain commands that would
result in output different than expected.
Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D35876
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As per Utility Syntax Guidelines, accept both forms: -l -n and -ln.
To do that, anticipate the source string for the next option that will
be parsed by nextopt(). It's not always *argptr, sometimes it is
nextopt_optptr.
To simplify the check for not_fcnumber, slightly modify nextopt() to
always nullify nextopt_optptr in cases where it would have been set
to point to a NUL character.
Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D35836
|
|
|
|
|
|
|
|
| |
This matches how a non-timeout error is handled.
Reviewed by: jilles
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D31876
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX is pretty clear that command -v, command -V and type shall write
absolute pathnames. Therefore, we need to prepend the current directory's
name to relative pathnames.
This can happen either when PATH contains a relative pathname or when the
operand contains a slash but is not an absolute pathname.
Notes:
svn path=/head/; revision=365037
|
|
|
|
| |
Notes:
svn path=/head/; revision=336320
|
|
|
|
|
|
|
|
| |
Submitted by: Robert Elz
MFC after: 3 days
Notes:
svn path=/head/; revision=333092
|
|
|
|
|
|
|
|
|
|
| |
- man pages
- bin/sh
Reviewed by: jilles
Notes:
svn path=/head/; revision=327281
|
|
|
|
|
|
|
|
|
|
|
|
| |
If CDPATH is used non-trivially or the operand is "-", cd writes the
directory actually switched to. (We currently do this only in interactive
shells, but POSIX requires this in non-interactive shells as well.)
As mentioned in Austin group bug #1045, cd shall not return an error while
leaving the current directory changed. Therefore, ignore any write error.
Notes:
svn path=/head/; revision=320340
|
|
|
|
|
|
|
|
|
|
|
| |
It does not make much sense to generate the '-' in a pattern bracket
expression using arithmetic expansion, but it does not make sense to forbid
it either.
Try to avoid reprocessing the string if it is unnecessary.
Notes:
svn path=/head/; revision=318269
|
|
|
|
|
|
|
|
|
|
|
| |
It does not make much sense to generate the '-' in a pattern bracket
expression using arithmetic expansion, but it does not make sense to forbid
it either.
This test already passes.
Notes:
svn path=/head/; revision=318258
|
|
|
|
|
|
|
|
|
|
|
| |
After executing a builtin with different locale settings such as
LC_ALL=C true
SIGINT handling was left disabled indefinitely.
MFC after: 1 week
Notes:
svn path=/head/; revision=317912
|
|
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=305305
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of changing the whole course to another POSIX-permitted way
for consistency and uniformity I decide to completely ignore missing
regex fucntionality and focus on fixing bugs in what we have now,
too many small obstacles we have choicing other way, counting ports.
Corresponding libc changes are backed out in r302824.
Notes:
svn path=/head/; revision=302829
|
|
|
|
|
|
|
| |
Approved by: jilles
Notes:
svn path=/head/; revision=302712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
after r298107
Summary of changes:
- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
namespacing is kept with FILES appropriately, and that this shouldn't need
to be repeated if the namespace changes -- only the definition of PACKAGE
needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
`tests`. In the event we get to the point where things can be split up
enough in the base system, it would make more sense to group the tests
with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)
Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.
MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=299094
|
|\
| |
| |
| |
| |
| |
| | |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/projects/release-pkg/; revision=297824
|
| |
| |
| |
| |
| |
| |
| |
| | |
The builtins/getopts1.0 test failed if a single-character file existed in
the current directory.
Notes:
svn path=/head/; revision=297752
|
|\|
| |
| |
| |
| |
| |
| | |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/projects/release-pkg/; revision=297567
|
| |
| |
| |
| |
| |
| |
| | |
MFC after: 1 week
Notes:
svn path=/head/; revision=297360
|
|\|
| |
| |
| |
| |
| |
| | |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/projects/release-pkg/; revision=296625
|
| |
| |
| |
| |
| |
| |
| | |
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=296587
|
| |
| |
| |
| |
| |
| |
| |
| | |
The option does not do anything so check that the output of 'set +o' is
different.
Notes:
svn path=/head/; revision=296578
|
| |
| |
| |
| |
| |
| |
| | |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/projects/release-pkg/; revision=295215
|
|/
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/projects/release-pkg/; revision=295171
|
|
|
|
|
|
|
|
| |
If a local variable has been made read-only, this should not prevent its
removal when the function returns.
Notes:
svn path=/head/; revision=294593
|
|
|
|
| |
Notes:
svn path=/head/; revision=294582
|
|
|
|
|
|
|
|
|
|
|
| |
Some variables like PATH call a function when modified. Make sure to call
this also when leaving a function where such a variable was made local.
Make sure to restore local variables before shellparam, so getopts state is
not clobbered.
Notes:
svn path=/head/; revision=293635
|
|
|
|
|
|
|
|
|
| |
Redirect 'cd -' output to /dev/null since POSIX requires it to write the new
directory name even if not interactive, but we currently only write it if
interactive.
Notes:
svn path=/head/; revision=293371
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Command substitutions containing a single simple command and here-document
expansion are performed in a subshell environment, but may not fork. Any
modified state of the shell environment should be restored afterward.
The state that OPTIND=1 had been done was not saved and restored here.
Note that the other parts of shellparam need not be saved and restored,
since they are not modified in these situations (a fork is done before such
modifications).
Notes:
svn path=/head/; revision=293359
|
|
|
|
|
|
|
| |
This was forgotten in r273700.
Notes:
svn path=/head/; revision=293120
|
|
|
|
|
|
|
|
| |
Characters escaped with a backslash must be treated as if they were not in
IFS. This includes stripping trailing IFS characters.
Notes:
svn path=/head/; revision=287308
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The initial check for a matching ] was incorrect if a ] may be consumed by a
[:class:]. The subsequent loop assumed that there must be a ].
Remove the initial check and make the loop cope with a missing ].
Found with afl-fuzz.
MFC after: 1 week
Notes:
svn path=/head/; revision=287148
|
|
|
|
|
|
|
| |
This was originally broken in r212339 in 2010.
Notes:
svn path=/head/; revision=286826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
n n...'.
The parser considered 'trap exit INT' to reset the default for both EXIT and
INT. This beahvior is not POSIX compliant. This was avoided if a value was
specified for 'exit', but then disallows exiting with the signal received. A
possible workaround is using ' exit'.
However POSIX does allow this type of behavior if the parameters are all
integers. Fix the handling for this and clarify its support in the manpage
since it is specifically allowed by POSIX.
Differential Revision: https://reviews.freebsd.org/D2325
Reviewed by: jilles
MFC after: 2 weeks
Notes:
svn path=/head/; revision=281718
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX does not permit to continuing a getopts loop with different
arguments. For parsing the positional parameters, we handle this case by
resetting the getopts state when the positional parameters are changed in
any way (and the getopts state is local to a function). However, in the
syntax getopts <optstring> <var> <arg...>, changes could lead to invalid
memory access.
In the syntax getopts <optstring> <var> <arg...>, store a copy of the
arguments and continue to use them until getopts is reset.
Notes:
svn path=/head/; revision=273700
|
|
|
|
|
|
|
|
| |
Example:
eval $'return\necho bad'
Notes:
svn path=/head/; revision=272983
|
|
|
|
| |
Notes:
svn path=/head/; revision=272482
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new code uses a "test discovery mechanism" to determine
what tests are available for execution
The test shell can be specified via:
kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh
Sponsored by: EMC / Isilon Storage Division
Approved by: jmmv (mentor)
Reviewed by: jilles (maintainer)
Notes:
svn path=/head/; revision=269902
|
|
|
|
|
|
|
| |
The argument is capped to loopnest, so strtol()'s [ERANGE] can be ignored.
Notes:
svn path=/head/; revision=268927
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test locale1.0 depends on locale support; it is meaningless without a
working LC_MESSAGES.
I added an OptionalObsoleteFiles.inc entry.
PR: 181151
Submitted by: Garrett Cooper (original version)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=268429
|
|
|
|
| |
Notes:
svn path=/head/; revision=265849
|
|
|
|
| |
Notes:
svn path=/head/; revision=265846
|
|
|
|
|
|
|
|
|
|
| |
When getopts finds an invalid option or a missing option-argument, it should
not reset its state and should set OPTIND as normal. This is an old ash bug
that was fixed long ago in dash. Our behaviour now matches most other
shells.
Notes:
svn path=/head/; revision=265844
|
|
|
|
|
|
|
| |
Adjust a testcase for this change.
Notes:
svn path=/head/; revision=265773
|
|
|
|
| |
Notes:
svn path=/head/; revision=265616
|
|
|
|
|
|
|
|
|
|
|
| |
When killing a %job started without job control, kill all processes in it.
As with process groups and zombies, if any process in the job can be killed
or has already terminated, the command is successful.
This also fixes occasional failures of the builtins/kill1.0 test.
Notes:
svn path=/head/; revision=263206
|
|
|
|
|
|
|
|
|
| |
If a job has terminated but is still known, silently do nothing when using
the kill builtin with the job specifier. Formerly, the shell called kill()
with the process group ID that might have been reused.
Notes:
svn path=/head/; revision=262931
|
|
|
|
|
|
|
|
|
| |
Example:
f() { : ${LINENO+$((1/0))}; }
and call this function twice.
Notes:
svn path=/head/; revision=262565
|