vtest "Test object trimming"

barrier b1 cond 2
barrier b2 cond 2

server s1 {
	rxreq
	txresp -nolen -hdr "Transfer-encoding: chunked"
	delay .2
	chunkedlen 4096
	barrier b1 sync
	barrier b2 sync
	chunkedlen 0
} -start

vinyl v1 \
	-arg "-s default,1m" -vcl+backend { } -start

client c1 {
	txreq
	rxresp
} -start

barrier b1 sync
vinyl v1 -expect SM?.s0.g_bytes > 10000

barrier b2 sync

client c1 -wait
vinyl v1 -expect SM?.s0.g_bytes < 6000
