Skip to content

Compile Java regression test sources (5/n)#8556

Merged
tautschnig merged 10 commits intodiffblue:developfrom
peterschrammel:ps/compile-java-regression-test-sources5
May 5, 2026
Merged

Compile Java regression test sources (5/n)#8556
tautschnig merged 10 commits intodiffblue:developfrom
peterschrammel:ps/compile-java-regression-test-sources5

Conversation

@peterschrammel
Copy link
Copy Markdown
Member

of jbmc/(c.*|d.*) JBMC regression tests

Cf. #8487

  • Each commit message has a non-empty body, explaining why the change was made.
  • [n/a] Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • [n/a] The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • [n/a] Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • [n/a] My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • [n/a] White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@peterschrammel peterschrammel force-pushed the ps/compile-java-regression-test-sources5 branch 2 times, most recently from 2cd16d8 to 2fa26a9 Compare January 5, 2025 16:25
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.52%. Comparing base (393c56d) to head (a124dc7).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8556   +/-   ##
========================================
  Coverage    80.52%   80.52%           
========================================
  Files         1705     1705           
  Lines       188927   188927           
  Branches        73       73           
========================================
+ Hits        152127   152136    +9     
+ Misses       36800    36791    -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add pom.xml for compilation, move sources, remove obsolete pre-compiled class files.
Add pom.xml for compilation, move sources, remove obsolete pre-compiled class files.
Add pom.xml for compilation, move sources, remove obsolete pre-compiled class files.
Add pom.xml for compilation, move sources, remove obsolete pre-compiled class files.
some_exception1 and some_exception2 classes were missing,
leading to wrong results.
Changed to test to check in heritance behavior on
catching exception classes.
Add pom.xml for compilation, move sources, remove obsolete pre-compiled class files.
Add pom.xml for compilation, move sources, remove obsolete pre-compiled class files.
Add missing desiredAssertionStatus method to local java.lang.Class model.
For compilation of .j Java assembler files.
Add pom.xml for compilation, move sources, remove obsolete pre-compiled class files.
@tautschnig tautschnig force-pushed the ps/compile-java-regression-test-sources5 branch 3 times, most recently from 9039561 to 8e2f57f Compare May 4, 2026 11:43
@tautschnig tautschnig force-pushed the ps/compile-java-regression-test-sources5 branch 5 times, most recently from 2cb0a06 to 85fbeda Compare May 5, 2026 10:28
Add pom.xml for compilation, move sources to src/main/java/,
remove obsolete pre-compiled class files, and update test
descriptors to use -cp target/classes (with core-models.jar and
cprover-api.jar on the classpath where needed).

This converts all remaining test directories that have Java or
Jasmin source files. Special handling for:

- Tests with opaque/stub classes (NondetEnumOpaqueReturn,
  cprover-always-load-nondet-initialize, lazyloading_opaquereturn):
  Opaque.class is deleted after compilation so JBMC treats it as a
  stub and nondet-initializes return values.

- Tests with ASM-generated bytecode (swap1, tableswitch2): Use
  exec-maven-plugin to run ASM generators that produce bytecode
  patterns no Java compiler can emit.

- Tests with multiple compilations of the same class
  (classpath-class-with-one-dir, inherited_static_field9/10,
  overlay-class): Use maven-antrun-plugin for multi-phase compilation.

- Tests with deliberately malformed artifacts
  (classpath-*-incorrect-package): Use antrun to place class files
  in wrong locations or build malformed jars.

- Tests with pre-compiled third-party/Kotlin class files (lambda2,
  parameter-annotation-not-null): Keep pre-compiled class files that
  cannot be compiled from Java source.

- Groovy test (swap2): Compiled with gmavenplus-plugin using
  Gradle API as dependency.

- lvt-groovy: Kept as pre-compiled class file (Groovy bytecode
  varies by JDK version).

- jsr1: Documented as not compilable (JSR/RET bytecodes removed
  in Java 7).

Update test expectations for JDK 11+ bytecode (stable across JDK
11, 17, and 21): line numbers, bytecode-index values, class loading
paths, parameter names, destructor patterns.

Add Makefile cleanup rules for generated files outside target/.

Mark 3 NondetEnumOpaqueReturn tests as KNOWNBUG (genuine JBMC
unsoundness with enum nondet initialization from opaque returns
with JDK 11+ bytecode).

Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
@tautschnig tautschnig force-pushed the ps/compile-java-regression-test-sources5 branch from c5d2e02 to a124dc7 Compare May 5, 2026 14:47
@tautschnig tautschnig marked this pull request as ready for review May 5, 2026 14:48
Copilot AI review requested due to automatic review settings May 5, 2026 14:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@tautschnig tautschnig merged commit f7e0c02 into diffblue:develop May 5, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants