[6.0] 4db00afa9 Test error handling when the -a UDS path is too long.

Geoff Simmons geoff at uplex.de
Thu Aug 16 08:52:21 UTC 2018


commit 4db00afa9face7fe55bf12f3b0f8cbcfd7282a09
Author: Geoff Simmons <geoff at uplex.de>
Date:   Fri Mar 23 13:16:02 2018 +0100

    Test error handling when the -a UDS path is too long.
    
    We currently suppress the error message that actually explains the
    problem.

diff --git a/bin/varnishtest/tests/c00003.vtc b/bin/varnishtest/tests/c00003.vtc
index 9dfb2200b..1c369bb07 100644
--- a/bin/varnishtest/tests/c00003.vtc
+++ b/bin/varnishtest/tests/c00003.vtc
@@ -18,6 +18,11 @@ shell -err -expect "Too many protocol sub-args" {
 	varnishd -a 127.0.0.1:80000,HTTP,FOO -d
 }
 
+# -a UDS path too long
+shell -err -match "Got no socket" {
+	varnishd -a /Although/sizeof/sockaddr_un/sun_path/is/platform/specific/this/path/is/really/definitely/and/most/assuredly/too/long/on/any/platform/--/any/length/that/results/in/sizeof/sockaddr_un/being/greater/than/128/will/probably/be/enough/to/blow/it/up. -d
+}
+
 # -a relative path for a UDS address not permitted
 shell -err -expect "Unix domain socket addresses must be absolute paths" {
 	varnishd -a foo/bar.sock -d


More information about the varnish-commit mailing list