The NetBSD Project

CVS log for src/tests/bin/sh/t_redir.sh

[BACK] Up to [cvs.NetBSD.org] / src / tests / bin / sh

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.14 / (download) - annotate - [select for diffs], Sun Nov 21 20:50:35 2021 UTC (14 months, 1 week ago) by kre
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.13: +54 -23 lines
Diff to previous 1.13 (colored)


Deal with a lot more pipes into atf_check missed last time.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Nov 16 11:15:26 2021 UTC (14 months, 2 weeks ago) by kre
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)


Fix a test that has been (unnoticed) failing ever since printf(1) was
changed to exit(1) when it detects a write error to stdout.

Running printf with stdout closed is guaranteed to generate such a
condition.

Until the previous commit, while the test case was actually failing
(stderr was expected to be empty. and was not) this was unnoticed.
We don't want the output (obviously), we also don't want the error
message, so just direct the latter to /dev/null.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Nov 16 11:12:14 2021 UTC (14 months, 2 weeks ago) by kre
Branch: MAIN
Changes since 1.11: +12 -6 lines
Diff to previous 1.11 (colored)


Correct a systematic atf_check usage error.   One must not pipe into
atf_check and simply expect it to work - the shell is permitted to,
and our shell currently does, run all commands in a pipeline in subshell
environments - when atf_check attempts to exit to indicate failure, it
only exits from that subshell, and the rest of the test continues, usually
to indicate success

Instead, when it is necessary (or just convenient) to pipe into atf_check
check the exit status of the pipeline (if atf_check is not last, which it
would usually be, then we would need the pipefail option set - there are
currently no such cases), and explicitly fail if atf_check did not exit(0).

Revision 1.10.6.1 / (download) - annotate - [select for diffs], Mon May 31 22:15:23 2021 UTC (20 months ago) by cjep
Branch: cjep_staticlib_x
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

sync with head

Revision 1.11 / (download) - annotate - [select for diffs], Wed May 19 22:43:18 2021 UTC (20 months, 1 week ago) by kre
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)


Handle the (very) recent change to printf(1) - when writing to a closed
stdout printf(1) now issues an error message, hence stderr in such cases
should not be empty, rather than should be empty.   Adapt to that.

Revision 1.9.16.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:59 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.9: +101 -1 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync with HEAD

Revision 1.9.14.1 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:08 2018 UTC (4 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.9: +101 -1 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.10 / (download) - annotate - [select for diffs], Tue Nov 27 09:55:32 2018 UTC (4 years, 2 months ago) by kre
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp, cjep_staticlib_x-base
Branch point for: cjep_staticlib_x
Changes since 1.9: +101 -1 lines
Diff to previous 1.9 (colored)


Add a new test case to test <> (open for input & output),
includion a test to make sure that the file doesn't get truncated.

Add new subtests to the "incorrect redirections" test case, to
validate correct behaviour of the shell when redirections fail in
various scenarios, including when the redirect is the whole command.

More along these lines are really needed, but this is better than nothing.

All the added tests pass on the /bin/sh currently in netbsd HEAD.

Revision 1.9 / (download) - annotate - [select for diffs], Sat May 14 00:33:02 2016 UTC (6 years, 8 months ago) by kre
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-base, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.8: +16 -1 lines
Diff to previous 1.8 (colored)


Add another test for the 48875 fix fallout...

Revision 1.8 / (download) - annotate - [select for diffs], Wed May 11 17:43:17 2016 UTC (6 years, 8 months ago) by kre
Branch: MAIN
Changes since 1.7: +16 -2 lines
Diff to previous 1.7 (colored)


Add a test for fd redirections on functions in loops (the etcupdate issue)
and also fix a quoting bug which was causing a test to fail, though
ATF was ignoring (an ATF bug to be investigated later.)

OK christos@

Revision 1.7 / (download) - annotate - [select for diffs], Mon May 9 22:34:37 2016 UTC (6 years, 8 months ago) by kre
Branch: MAIN
Changes since 1.6: +159 -1 lines
Diff to previous 1.6 (colored)


PR bin/48875   PR bin/51123    This adds tests more that verify fide descriptor
redirection works correctly (including that the bugs reported in those PRs
are fixed.)  Note that the tests for 48875 are slow, so one of the new
test cases ends up running > 25 seconds (just doing sleeps) - each individual
test is just a few seconds, but there are several of them.

OK christos@

Revision 1.6 / (download) - annotate - [select for diffs], Mon May 2 01:47:14 2016 UTC (6 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.5: +261 -4 lines
Diff to previous 1.5 (colored)

More redirect tests, in particular, tests for redirects to/from
file descriptors outside the 0..9 range, and complex fd
reassignments.  Also test that the shell can cope with the
value of ulimit -n changing (downwards, up is harmless)
(Freom kre@)

Revision 1.5 / (download) - annotate - [select for diffs], Sun Mar 27 14:49:07 2016 UTC (6 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.4: +14 -21 lines
Diff to previous 1.4 (colored)

Avoid relying on the test shell correctly implementing $(( ))
in order for some of the redirect tests to terminate. (from kre@)

Revision 1.4 / (download) - annotate - [select for diffs], Tue Mar 8 14:26:54 2016 UTC (6 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.3: +417 -9 lines
Diff to previous 1.3 (colored)

Added more test cases, more exhaustive testing. (from kre)

Revision 1.3 / (download) - annotate - [select for diffs], Tue Mar 1 12:39:35 2016 UTC (6 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.2: +8 -7 lines
Diff to previous 1.2 (colored)

Improved handling of TEST_SH so that it is possible to define it
to the name of a shell, plus options that shell needs to run it
in the correct mode to be tested: eg: TEST_SH='bash -o posix'
Also finished the implementation of tests of "set -n" now that
the NetBSD shell supports that as it should. (from kre)

Revision 1.2 / (download) - annotate - [select for diffs], Tue Feb 23 14:21:37 2016 UTC (6 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.1: +20 -3 lines
Diff to previous 1.1 (colored)

Add new redirection test, from kre

Revision 1.1 / (download) - annotate - [select for diffs], Mon Feb 22 19:52:03 2016 UTC (6 years, 11 months ago) by christos
Branch: MAIN

Add new test

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>