Mailing List Archive

[master] c64ef384b Try to work around "echo -n" being broken on Solaris
commit c64ef384bf42d177ac5581ab2321e061cdc94e16
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Tue Dec 5 13:03:12 2023 +0000

Try to work around "echo -n" being broken on Solaris

diff --git a/bin/varnishtest/tests/u00000.vtc b/bin/varnishtest/tests/u00000.vtc
index 95fac23dd..8ce91b74b 100644
--- a/bin/varnishtest/tests/u00000.vtc
+++ b/bin/varnishtest/tests/u00000.vtc
@@ -172,9 +172,9 @@ shell -err -expect {Cannot read -f file} {

# Test that incomplete CLI commands in -I causes failure

+filewrite ${tmpdir}/_foobar foobar
+
process p1 {
- /bin/echo -n foobar > ${tmpdir}/_foobar
- ls -l ${tmpdir}/_foobar
exec varnishd -n ${tmpdir}/v0 -d -a :0 -I ${tmpdir}/_foobar 2>&1
} -expect-exit 2 -dump -start

_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Re: [master] c64ef384b Try to work around "echo -n" being broken on Solaris [ In reply to ]
On Tue, Dec 5, 2023 at 1:04?PM Poul-Henning Kamp <phk@freebsd.org> wrote:
>
>
> commit c64ef384bf42d177ac5581ab2321e061cdc94e16
> Author: Poul-Henning Kamp <phk@FreeBSD.org>
> Date: Tue Dec 5 13:03:12 2023 +0000
>
> Try to work around "echo -n" being broken on Solaris

echo(1) has no portable option, so why not printf(1) instead?

> diff --git a/bin/varnishtest/tests/u00000.vtc b/bin/varnishtest/tests/u00000.vtc
> index 95fac23dd..8ce91b74b 100644
> --- a/bin/varnishtest/tests/u00000.vtc
> +++ b/bin/varnishtest/tests/u00000.vtc
> @@ -172,9 +172,9 @@ shell -err -expect {Cannot read -f file} {
>
> # Test that incomplete CLI commands in -I causes failure
>
> +filewrite ${tmpdir}/_foobar foobar
> +
> process p1 {
> - /bin/echo -n foobar > ${tmpdir}/_foobar
> - ls -l ${tmpdir}/_foobar
> exec varnishd -n ${tmpdir}/v0 -d -a :0 -I ${tmpdir}/_foobar 2>&1
> } -expect-exit 2 -dump -start
>
> _______________________________________________
> varnish-commit mailing list
> varnish-commit@varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Re: [master] c64ef384b Try to work around "echo -n" being broken on Solaris [ In reply to ]
--------
Dridi Boukelmoune writes:
> On Tue, Dec 5, 2023 at 1:04=E2=80=AFPM Poul-Henning Kamp <phk@freebsd.org> =
> wrote:
> >
> >
> > commit c64ef384bf42d177ac5581ab2321e061cdc94e16
> > Author: Poul-Henning Kamp <phk@FreeBSD.org>
> > Date: Tue Dec 5 13:03:12 2023 +0000
> >
> > Try to work around "echo -n" being broken on Solaris
>
> echo(1) has no portable option, so why not printf(1) instead?

because I'm sure there are systems without printf(1) too :-)


--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit