Skip to content

Instantly share code, notes, and snippets.

@rezan
Last active February 13, 2017 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rezan/6fe03ee50f1132a154336d0f41b24503 to your computer and use it in GitHub Desktop.
Save rezan/6fe03ee50f1132a154336d0f41b24503 to your computer and use it in GitHub Desktop.
Capture panic
varnishtest "Capture potential panic (sleep => gdb attach to pid)"
varnish v1 -cli "help"
shell "sleep 20"
server s1 {
rxreq
txresp
expect req.url == "/"
} -start
varnish v1 -vcl+backend {
sub vcl_deliver {
set resp.http.X-test = "true";
}
} -start
client c1 {
txreq -url "/"
rxresp
expect resp.status == 200
expect resp.http.X-test == "true"
} -run
varnish v1 -cli "panic.show"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment