aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-02-07 02:03:51 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-02-07 02:03:51 +0100
commit8ee2adab21328761b80e0cbc513eda7eaa880b24 (patch)
treec771696ab3b1be735e831b1721ab751c874e1cd3 /shell/hush_test
parentb8ab4b038803df195eee9844c3597dd640c00393 (diff)
downloadbusybox-8ee2adab21328761b80e0cbc513eda7eaa880b24.tar.gz
echo: do not retry on write errors
function old new delta echo_main 297 336 +39 stpcpy - 22 +22 run_pipe 1561 1566 +5 pseudo_exec_argv 187 192 +5 hush_exit 75 80 +5 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 4/0 up/down: 98/0) Total: 76 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-misc/echo_write_error.right2
-rwxr-xr-xshell/hush_test/hush-misc/echo_write_error.tests7
2 files changed, 9 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/echo_write_error.right b/shell/hush_test/hush-misc/echo_write_error.right
new file mode 100644
index 000000000..ddcad4363
--- /dev/null
+++ b/shell/hush_test/hush-misc/echo_write_error.right
@@ -0,0 +1,2 @@
+hush: write error: Broken pipe
+Ok: 1
diff --git a/shell/hush_test/hush-misc/echo_write_error.tests b/shell/hush_test/hush-misc/echo_write_error.tests
new file mode 100755
index 000000000..0a40c9ff7
--- /dev/null
+++ b/shell/hush_test/hush-misc/echo_write_error.tests
@@ -0,0 +1,7 @@
+trap "" PIPE
+
+{
+sleep 1
+echo Cant write this - get EPIPE
+echo Ok: $? >&2
+} | { true; }