Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

JVM backend continues after dynamic Test::More skip_all

未关闭
#1,471 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
java, perl

调研方向

Start with the minimal reproducer and the JVM backend's Test::More/Test2 skip-all path, then compare it with the interpreter backend. Use t/live_prerelease.t as the real-world case and add the suggested permanent unit test for a dynamically evaluated skip_all followed by a failing statement. Done means both backends exit successfully while preserving the skip TAP output.

由索引模型根据 Issue 内容生成。

描述

area:backend area:cpan-port area:runtime bug

Summary

The JVM backend does not terminate successfully after Test::More receives a
dynamic skip_all plan. It prints the skip plan but continues executing the
rest of the test file. The interpreter backend and standard Perl terminate
successfully.

CPAN evidence

  • Distribution: Net::Google::Storage 0.2.0
  • CPAN run: 20260921-124328-13959
  • Failing test: t/live_prerelease.t
  • Passing test: t/basic.t
  • System Perl focused result: pass; t/basic.t passes and
    t/live_prerelease.t is skipped because Test::Class is unavailable.
  • The live test also requires optional Google Storage credentials/configuration
    and is not part of the local functional test.

The archived JVM result was:

Can't locate object method "runtests" via package "Test::Class"
 at t/live_prerelease.t line 10.
t/live_prerelease.t ...... skipped: Probable missing Test::Class
Result: FAIL

The test contains this optional-dependency guard:

BEGIN {
    use lib 't/lib';
    eval { require Net::Google::Storage::Test; };
    if ($@) {
        eval "use Test::More skip_all => 'Probable missing Test::Class';";
    }
}

Test::Class->runtests;

The upstream test is fragile because the method call is unconditional, but
standard Perl's skip_all behavior makes the file exit successfully before
that call.

Minimal reproducer

eval { require Test::Class::DefinitelyMissing };
if ($@) {
    eval q{use Test::More skip_all => "missing optional dependency"};
}
Test::Class->runtests;

Observed results:

Runtime Result
System Perl 1..0 # SKIP ..., exit 0
PerlOnJava JVM backend 1..0 # SKIP ..., then missing-method error, exit 255
PerlOnJava interpreter backend 1..0 # SKIP ..., exit 0

The JVM backend also prints AFTER-SKIP for a variant that prints after the
skip_all call, proving that execution continues after the skip plan. The
interpreter backend does not print it.

Expected behavior

The JVM backend should treat a skip_all plan as successful test termination,
including when Test::More is loaded dynamically inside eval STRING. Code
following the skip plan must not execute, and the process should exit 0.

Suggested acceptance coverage

Add a permanent unit test covering a dynamically evaluated
Test::More skip_all followed by an otherwise-failing statement. Require
successful exit on both the JVM and interpreter backends, while preserving the
skip TAP output.

Likely ownership

This appears to be a JVM-backend control-flow/exit propagation issue in the
Test::More/Test2 skip-all path, not a Net::Google::Storage API or module
implementation issue.

主要语言
Perl
星标
64
派生
6
平均合并
5 小时 38 分钟
30 天内合并 PR
170

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fglock/PerlOnJava 的其他 Issue

查看 fglock/PerlOnJava 的全部 Issue

相似的 Issue

更多 Perl Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。