diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-perl/Plack/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-perl/Plack/files')
-rw-r--r-- | dev-perl/Plack/files/Plack-1.3.900-issue-545.patch | 22 | ||||
-rw-r--r-- | dev-perl/Plack/files/Plack-1.3.900-network-testing.patch | 196 |
2 files changed, 218 insertions, 0 deletions
diff --git a/dev-perl/Plack/files/Plack-1.3.900-issue-545.patch b/dev-perl/Plack/files/Plack-1.3.900-issue-545.patch new file mode 100644 index 000000000000..b4a3fb747de9 --- /dev/null +++ b/dev-perl/Plack/files/Plack-1.3.900-issue-545.patch @@ -0,0 +1,22 @@ +From 86256c2af6115a2c99c310ba6979bf40f72a6864 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Richard=20Sim=C3=B5es?= <rsimoes@gmail.com> +Date: Sun, 3 Jan 2016 19:49:51 -0600 +Subject: [PATCH] Allow log4perl.t and log4perl-category.t to run in parallel + +--- + t/Plack-Middleware/log4perl-category.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/Plack-Middleware/log4perl-category.t b/t/Plack-Middleware/log4perl-category.t +index 1951015..946edbf 100644 +--- a/t/Plack-Middleware/log4perl-category.t ++++ b/t/Plack-Middleware/log4perl-category.t +@@ -6,7 +6,7 @@ use Test::More; + use Plack::Middleware::Log4perl; + use HTTP::Request::Common; + +-my $test_file = "t/Plack-Middleware/log4perl.log"; ++my $test_file = "t/Plack-Middleware/log4perl-category.log"; + + my $conf = <<CONF; + log4perl.logger.0 = INFO, Logfile diff --git a/dev-perl/Plack/files/Plack-1.3.900-network-testing.patch b/dev-perl/Plack/files/Plack-1.3.900-network-testing.patch new file mode 100644 index 000000000000..6d703a9e1fc6 --- /dev/null +++ b/dev-perl/Plack/files/Plack-1.3.900-network-testing.patch @@ -0,0 +1,196 @@ +From 5f5a0a34556d0ae739f79d7c148d24fcf3ff8557 Mon Sep 17 00:00:00 2001 +From: Kent Fredric <kentfredric@gmail.com> +Date: Wed, 3 Aug 2016 01:26:17 +1200 +Subject: [PATCH] Fence of Network IO with NO_NETWORK_TESTING + +This is a workaround for #477 but doesn't actually fix the underlying +issue, merely recognises that some vendors are smart enough to +anticipate Network IO will fail and integrate this ENV var to quickly +avoid it. + +This precedent was established by Test::RequiresInternet as a result of +a CPANworkers discussion, and Gentoo is known to export this variable +within its tooling by default as a result. + +This doesn't actually test that binding a socket/IP will work, but this +fence should be tested anyway, because security measures could result in +attempted socket/IP binds getting SIGKILLed ( Sandbox ) + +This commit hence addresses/fences only the problem cases listed in bug +in depth. + +However, this commit targets to simply solve the known parts of the +problem in the simplest way possible without any extra dependencies. + +The application of a BEGIN { } block and `print` was a design decision +instead of using `Test::More` and `skip`, because the overhead of +loading Test::More is quite high when you have lots of .t files, and +Test2 further increases the load time. + +This load time is generally acceptable if you're actually running a +dozen tests, but spinning up a full suite of Test::More to only then +immediately exit with a skip is a lot of CPU load for relatively little +benefit. +--- + t/Plack-Handler/standalone.t | 6 ++++++ + t/Plack-Loader/shotgun.t | 6 ++++++ + t/Plack-Middleware/component-leak.t | 7 +++++++ + t/Plack-Middleware/error_document_streaming_app.t | 7 +++++++ + t/Plack-Middleware/stacktrace/sigdie.t | 7 +++++++ + t/Plack-Middleware/stacktrace/utf8.t | 7 +++++++ + t/Plack-Middleware/urlmap_ports.t | 6 ++++++ + t/Plack-Test/2args.t | 7 +++++++ + t/Plack-Test/hello_server.t | 7 +++++++ + t/Plack-Util/response_cb.t | 7 +++++++ + 10 files changed, 67 insertions(+) + +diff --git a/t/Plack-Handler/standalone.t b/t/Plack-Handler/standalone.t +index f5fcf26..b42de16 100644 +--- a/t/Plack-Handler/standalone.t ++++ b/t/Plack-Handler/standalone.t +@@ -1,3 +1,9 @@ ++BEGIN { ++ if ( $ENV{NO_NETWORK_TESTING} ) { ++ print '1..0 # SKIP Network connections required for this test'; ++ exit; ++ } ++} + use strict; + use warnings; + use Test::More; +diff --git a/t/Plack-Loader/shotgun.t b/t/Plack-Loader/shotgun.t +index cb7b95a..d9fe148 100644 +--- a/t/Plack-Loader/shotgun.t ++++ b/t/Plack-Loader/shotgun.t +@@ -1,3 +1,9 @@ ++BEGIN { ++ if ( $ENV{NO_NETWORK_TESTING} ) { ++ print '1..0 # SKIP Network connections required for this test'; ++ exit; ++ } ++} + use strict; + use warnings; + use Test::More; +diff --git a/t/Plack-Middleware/component-leak.t b/t/Plack-Middleware/component-leak.t +index 7cdab99..2acedd0 100644 +--- a/t/Plack-Middleware/component-leak.t ++++ b/t/Plack-Middleware/component-leak.t +@@ -1,3 +1,10 @@ ++BEGIN { ++ if ( $ENV{NO_NETWORK_TESTING} ) { ++ print '1..0 # SKIP Network connections required for this test'; ++ exit; ++ } ++} ++ + package MyComponent; + use strict; + use warnings; +diff --git a/t/Plack-Middleware/error_document_streaming_app.t b/t/Plack-Middleware/error_document_streaming_app.t +index b177c53..c893e7b 100644 +--- a/t/Plack-Middleware/error_document_streaming_app.t ++++ b/t/Plack-Middleware/error_document_streaming_app.t +@@ -1,3 +1,10 @@ ++BEGIN { ++ if ( $ENV{NO_NETWORK_TESTING} ) { ++ print '1..0 # SKIP Network connections required for this test'; ++ exit; ++ } ++} ++ + use strict; + use warnings; + use FindBin; +diff --git a/t/Plack-Middleware/stacktrace/sigdie.t b/t/Plack-Middleware/stacktrace/sigdie.t +index dc82b2c..28747cf 100644 +--- a/t/Plack-Middleware/stacktrace/sigdie.t ++++ b/t/Plack-Middleware/stacktrace/sigdie.t +@@ -1,3 +1,10 @@ ++BEGIN { ++ if ( $ENV{NO_NETWORK_TESTING} ) { ++ print '1..0 # SKIP Network connections required for this test'; ++ exit; ++ } ++} ++ + use strict; + use warnings; + use Test::More; +diff --git a/t/Plack-Middleware/stacktrace/utf8.t b/t/Plack-Middleware/stacktrace/utf8.t +index 6d2f51f..77849dc 100644 +--- a/t/Plack-Middleware/stacktrace/utf8.t ++++ b/t/Plack-Middleware/stacktrace/utf8.t +@@ -1,3 +1,10 @@ ++BEGIN { ++ if ( $ENV{NO_NETWORK_TESTING} ) { ++ print '1..0 # SKIP Network connections required for this test'; ++ exit; ++ } ++} ++ + use strict; + use warnings; + use Test::More; +diff --git a/t/Plack-Middleware/urlmap_ports.t b/t/Plack-Middleware/urlmap_ports.t +index 9a0a9c0..4ff4ba5 100644 +--- a/t/Plack-Middleware/urlmap_ports.t ++++ b/t/Plack-Middleware/urlmap_ports.t +@@ -1,3 +1,9 @@ ++BEGIN { ++ if ( $ENV{NO_NETWORK_TESTING} ) { ++ print '1..0 # SKIP Network connections required for this test'; ++ exit; ++ } ++} + use strict; + use Test::More; + use Plack::App::URLMap; +diff --git a/t/Plack-Test/2args.t b/t/Plack-Test/2args.t +index 2942f93..a68481d 100644 +--- a/t/Plack-Test/2args.t ++++ b/t/Plack-Test/2args.t +@@ -1,3 +1,10 @@ ++BEGIN { ++ if ( $ENV{NO_NETWORK_TESTING} ) { ++ print '1..0 # SKIP Network connections required for this test'; ++ exit; ++ } ++} ++ + use Plack::Test; + use Test::More; + use HTTP::Request::Common; +diff --git a/t/Plack-Test/hello_server.t b/t/Plack-Test/hello_server.t +index 47ffb75..dc9f4bd 100644 +--- a/t/Plack-Test/hello_server.t ++++ b/t/Plack-Test/hello_server.t +@@ -1,3 +1,10 @@ ++BEGIN { ++ if ( $ENV{NO_NETWORK_TESTING} ) { ++ print '1..0 # SKIP Network connections required for this test'; ++ exit; ++ } ++} ++ + use Test::More; + use Plack::Test; + +diff --git a/t/Plack-Util/response_cb.t b/t/Plack-Util/response_cb.t +index 813dc87..5cb31ba 100644 +--- a/t/Plack-Util/response_cb.t ++++ b/t/Plack-Util/response_cb.t +@@ -1,3 +1,10 @@ ++BEGIN { ++ if ( $ENV{NO_NETWORK_TESTING} ) { ++ print '1..0 # SKIP Network connections required for this test'; ++ exit; ++ } ++} ++ + use strict; + use warnings; + use Plack::Util; +-- +2.9.2 + |