Mercurial > hg > nginx-tests
comparison h2.t @ 770:c35b071d4b47
Tests: skip h2.t tests no longer that dumped core, fixes committed.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 28 Oct 2015 00:35:47 +0300 |
parents | 97442d620e3e |
children | cab9f60e561e |
comparison
equal
deleted
inserted
replaced
769:97442d620e3e | 770:c35b071d4b47 |
---|---|
2333 $sids = join ' ', map { $_->{sid} } @data; | 2333 $sids = join ' ', map { $_->{sid} } @data; |
2334 is($sids, "$sid $sid2", 'dependency - HEADERS PRIORITY 2'); | 2334 is($sids, "$sid $sid2", 'dependency - HEADERS PRIORITY 2'); |
2335 | 2335 |
2336 # HEADERS - self dependency | 2336 # HEADERS - self dependency |
2337 | 2337 |
2338 SKIP: { | |
2339 skip 'leaves coredump', 2 unless $ENV{TEST_NGINX_UNSAFE}; | |
2340 | |
2341 $sess = new_session(); | 2338 $sess = new_session(); |
2342 $sid = new_stream($sess, { dep => 1 }); | 2339 $sid = new_stream($sess, { dep => 1 }); |
2343 $frames = h2_read($sess, all => [{ type => 'RST_STREAM' }]); | 2340 $frames = h2_read($sess, all => [{ type => 'RST_STREAM' }]); |
2344 | 2341 |
2345 ($frame) = grep { $_->{type} eq "RST_STREAM" } @$frames; | 2342 ($frame) = grep { $_->{type} eq "RST_STREAM" } @$frames; |
2346 is($frame->{sid}, $sid, 'dependency - HEADERS self - RST_STREAM'); | 2343 is($frame->{sid}, $sid, 'dependency - HEADERS self - RST_STREAM'); |
2347 is($frame->{code}, 1, 'dependency - HEADERS self - PROTOCOL_ERROR'); | 2344 is($frame->{code}, 1, 'dependency - HEADERS self - PROTOCOL_ERROR'); |
2348 | |
2349 } | |
2350 | 2345 |
2351 # PRIORITY frame, weighted dependencies | 2346 # PRIORITY frame, weighted dependencies |
2352 | 2347 |
2353 $sess = new_session(); | 2348 $sess = new_session(); |
2354 | 2349 |
2414 | 2409 |
2415 # PRIORITY - reprioritization with circular dependency - after [3] removed | 2410 # PRIORITY - reprioritization with circular dependency - after [3] removed |
2416 # initial dependency tree: | 2411 # initial dependency tree: |
2417 # 1 <- [3] <- 5 | 2412 # 1 <- [3] <- 5 |
2418 | 2413 |
2419 SKIP: { | |
2420 skip 'leaves codedump', 3 unless $ENV{TEST_NGINX_UNSAFE}; | |
2421 | |
2422 $sess = new_session(); | 2414 $sess = new_session(); |
2423 | 2415 |
2424 h2_window($sess, 2**18); | 2416 h2_window($sess, 2**18); |
2425 | 2417 |
2426 h2_priority($sess, 16, 1, 0); | 2418 h2_priority($sess, 16, 1, 0); |
2466 is($frame->{length}, 81, 'removed dependency - first stream'); | 2458 is($frame->{length}, 81, 'removed dependency - first stream'); |
2467 | 2459 |
2468 ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == $sid3 } @$frames; | 2460 ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == $sid3 } @$frames; |
2469 is($frame->{length}, 81, 'removed dependency - last stream'); | 2461 is($frame->{length}, 81, 'removed dependency - last stream'); |
2470 | 2462 |
2471 } | |
2472 | |
2473 # PRIORITY - reprioritization with circular dependency - exclusive [5] | 2463 # PRIORITY - reprioritization with circular dependency - exclusive [5] |
2474 # 1 <- [5] <- 3 | 2464 # 1 <- [5] <- 3 |
2475 | |
2476 SKIP: { | |
2477 skip 'leaves coredump', 3 unless $ENV{TEST_NGINX_UNSAFE}; | |
2478 | 2465 |
2479 $sess = new_session(); | 2466 $sess = new_session(); |
2480 | 2467 |
2481 h2_window($sess, 2**18); | 2468 h2_window($sess, 2**18); |
2482 | 2469 |
2516 ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == $sid2 } @$frames; | 2503 ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == $sid2 } @$frames; |
2517 is($frame->{length}, 81, 'exclusive dependency - first stream'); | 2504 is($frame->{length}, 81, 'exclusive dependency - first stream'); |
2518 | 2505 |
2519 ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == $sid3 } @$frames; | 2506 ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == $sid3 } @$frames; |
2520 is($frame->{length}, 81, 'exclusive dependency - last stream'); | 2507 is($frame->{length}, 81, 'exclusive dependency - last stream'); |
2521 | |
2522 } | |
2523 | 2508 |
2524 # limit_conn | 2509 # limit_conn |
2525 | 2510 |
2526 $sess = new_session(); | 2511 $sess = new_session(); |
2527 h2_settings($sess, 0, 0x4 => 1); | 2512 h2_settings($sess, 0, 0x4 => 1); |
2774 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; | 2759 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; |
2775 is($frame->{headers}->{':status'}, 400, 'empty authority'); | 2760 is($frame->{headers}->{':status'}, 400, 'empty authority'); |
2776 | 2761 |
2777 # aborted stream with zero HEADERS payload followed by client connection close | 2762 # aborted stream with zero HEADERS payload followed by client connection close |
2778 | 2763 |
2779 new_stream(new_session(), { split => [ 9 ], abort => 1 }) | 2764 new_stream(new_session(), { split => [ 9 ], abort => 1 }); |
2780 if $ENV{TEST_NGINX_UNSAFE}; | |
2781 | 2765 |
2782 # unknown frame type | 2766 # unknown frame type |
2783 | 2767 |
2784 $sess = new_session(); | 2768 $sess = new_session(); |
2785 h2_unknown($sess, 'payload'); | 2769 h2_unknown($sess, 'payload'); |