Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip unsupported regression tests #615

Merged
merged 42 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
8b4ea8f
add support for ignoring tests after running them
maul-esel Dec 19, 2022
12536f9
preliminary support for test result deciders to skip tests
maul-esel Dec 19, 2022
f3ad4f9
First attempt to check if a test case is ignored
schuessf Feb 10, 2023
8fae4cd
Add possibility to ignore test failures to SafetyCheckTestResultDecider
schuessf Feb 10, 2023
a03eee8
Don't overwrite IGNORE result
schuessf Feb 10, 2023
2547848
Skip overflow tests as well
schuessf Feb 10, 2023
8cbef81
Ignore safety tests in various folders
schuessf Feb 10, 2023
688f032
Ignore some more tests and move to the correct location
schuessf Feb 13, 2023
da2b1a0
Ignore another test
schuessf Feb 15, 2023
1f787f0
Improve parsing of ignore file
schuessf Feb 15, 2023
522e294
Restructure ignore files, add comments with reason
schuessf Feb 15, 2023
ed8ccb9
Add expected verdict to ignored.txt, only skip with that verdict
schuessf Feb 15, 2023
dbd795a
Fix some expected verdicts
schuessf Feb 16, 2023
bcbff56
Catch case where String cannot be converted to enum
schuessf Feb 16, 2023
adde04c
Minor: Restructure method
schuessf Feb 16, 2023
6362e6a
Fix documentation
schuessf Feb 16, 2023
66815b3
Rename ignored.txt to .skip
schuessf Feb 28, 2023
4de4c3f
Refactoring, allow .skip file in toolchain and settings dir
schuessf Feb 28, 2023
75786af
Skip tests with overapproximation
schuessf May 5, 2023
fcfd79a
Fix build in new regression tests
schuessf Aug 19, 2024
fa6fc5f
Throw exception when testsuite does not support skipping tests
schuessf Aug 20, 2024
b03532f
Update .skip files
schuessf Aug 20, 2024
9189631
Skip data race tests
schuessf Aug 20, 2024
2467d4a
Fix updating wrong .skip file
schuessf Aug 20, 2024
c17b485
Use regex to check if test should be marked as skipped
schuessf Aug 20, 2024
989a4f2
Fix typo
schuessf Aug 20, 2024
b72f878
Remove unnecessary .skip file
schuessf Aug 20, 2024
b4ea028
Use YAML for skip files
schuessf Aug 20, 2024
ebef1df
Add missing space
schuessf Aug 20, 2024
ab8bd81
Use proper YAML syntax for skip files
schuessf Aug 20, 2024
362adb7
Only allow skip files next to the tests itself
schuessf Aug 20, 2024
a782a21
Use .testignore as filename
schuessf Sep 2, 2024
594d115
Split .testignore properly for subfolders
schuessf Sep 3, 2024
f845e42
Allow skipping termination tests
schuessf Sep 3, 2024
261c3fa
Add missing import
schuessf Sep 3, 2024
10f0efb
Add newline
schuessf Sep 3, 2024
1fbf05f
Add checks for no overriden result
schuessf Sep 3, 2024
9a97c39
Add newline
schuessf Sep 3, 2024
1f5cc6a
Avoid parentheses in regex
schuessf Sep 4, 2024
c9d2c0b
Add timeout
schuessf Sep 4, 2024
95ffcc8
Skip termination tests properly
schuessf Sep 4, 2024
ecb5fa7
Add separate method to override verdict
schuessf Sep 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions trunk/examples/concurrent/bpl/regression/.testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Timeout with Automizer, GemCutter succeeds
TIMEOUT:
- task: MirabelleConcurrentIncrement.bpl
settings: ReachSafety-32bit-Automizer.epf
toolchain: ReachSafety.xml
- task: concurrent_increment.bpl
settings: ReachSafety-32bit-Automizer.epf
toolchain: ReachSafety.xml
- task: equal-array-sums.bpl
settings: ReachSafety-32bit-Automizer.epf
toolchain: ReachSafety.xml
- task: loop-lockstep-example.bpl
settings: ReachSafety-32bit-Automizer.epf
toolchain: ReachSafety.xml
- task: sum_invariant.bpl
settings: ReachSafety-32bit-Automizer.epf
toolchain: ReachSafety.xml
16 changes: 16 additions & 0 deletions trunk/examples/concurrent/pthreads/races/regression/.testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
TIMEOUT:
- task: static-array-copy3.c
settings: DataRace-32bit-Automizer_Bitvector.epf
toolchain: DataRace.xml
- task: static-array-copy3.c
settings: DataRace-32bit-Automizer_Default.epf
toolchain: DataRace.xml
- task: static-array-copy3.c
settings: DataRace-32bit-GemCutter_Bitvector.epf
toolchain: DataRace.xml

# Crash in MathSAT
SMTLIBException.*mathsat:
- task: struct-array-write.c
settings: DataRace-32bit-GemCutter_Bitvector.epf
toolchain: DataRace.xml
5 changes: 5 additions & 0 deletions trunk/examples/concurrent/pthreads/regression/.testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Timeout with Automizer, GemCutter succeeds
TIMEOUT:
- task: NonAtomicIncrement_2Threads.c
settings: ReachSafety-32bit-Automizer.epf
toolchain: ReachSafety.xml
5 changes: 5 additions & 0 deletions trunk/examples/lassos/regression/.testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# The program contains non-linear-arithmetic, so we don't succeed with the linear setting
Unable to decide termination:
- task: ConvincingNondeterminism01.bpl
settings: BuchiAutomizerBpl-linear.epf
toolchain: BuchiAutomizerBpl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
TIMEOUT:
- task: SAS09-Float.c
settings: AutomizerC-Reach-32bit-Z3-IcWpLv-Float_Const.epf
toolchain: AutomizerC.xml
- task: ctrans-float-rounding.c
settings: AutomizerC-Reach-32bit-Z3-IcWpLv-Float_Const.epf
toolchain: AutomizerC.xml
4 changes: 4 additions & 0 deletions trunk/examples/programs/quantifier/regression/bpl/.testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
overapproximation:
- task: AuxVarInCall.bpl
settings: AutomizerBpl-forwardPredicates.epf
toolchain: AutomizerBpl.xml
4 changes: 4 additions & 0 deletions trunk/examples/programs/regression/bpl/.testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TIMEOUT:
- task: nestedWhileSimple-Safe.bpl
settings: PdrAutomizerBpl.epf
toolchain: PdrAutomizerBpl.xml
19 changes: 19 additions & 0 deletions trunk/examples/programs/regression/bpl/interprocedural/.testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
TIMEOUT:
- task: BugLiveVariables03-Safe.bpl
settings: AutomizerBpl-FPandBP.epf
toolchain: AutomizerBpl.xml
- task: BugNestedSsaWithPendingContexts.bpl
settings: AutomizerBpl-forwardPredicates.epf
toolchain: AutomizerBpl.xml
- task: BugNoPredecessorOfReturnTransition.bpl
settings: PdrAutomizerBpl.epf
toolchain: PdrAutomizerBpl.xml

# We are unable to backtranslate @diff from SMT to Boogie
unknown symbol.*@diff:
- task: BugLiveVariables03-Safe.bpl
settings: AutomizerBpl-nestedInterpolants.epf
toolchain: AutomizerBpl.xml
- task: BugLiveVariables04-Safe.bpl
settings: AutomizerBpl-nestedInterpolants.epf
toolchain: AutomizerBpl.xml
25 changes: 25 additions & 0 deletions trunk/examples/programs/regression/bpl/toolDirectives/.testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Issue in SMTInterpol
Const is only supported for infinite index sort:
- task: ConstArray.bpl
settings: AutomizerBpl-nestedInterpolants.epf
toolchain: AutomizerBpl.xml
- task: ConstArray.bpl
settings: AutomizerBpl-nestedInterpolants.epf
toolchain: PdrAutomizerBpl.xml
- task: ConstArray.bpl
settings: PdrAutomizerBpl.epf
toolchain: PdrAutomizerBpl.xml

Overapproximation:
- task: Overapproximation.bpl
settings: AutomizerBpl-nestedInterpolants.epf
toolchain: AutomizerBpl.xml
- task: Overapproximation.bpl
settings: AutomizerBpl-forwardPredicates.epf
toolchain: AutomizerBpl.xml
- task: Overapproximation.bpl
settings: AutomizerBpl-FPandBP.epf
toolchain: AutomizerBpl.xml
- task: Overapproximation.bpl
settings: PdrAutomizerBpl.epf
toolchain: PdrAutomizerBpl.xml
126 changes: 126 additions & 0 deletions trunk/examples/programs/regression/c/.testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Fails due to overapproximation of bitwise operators in the integer translation
Overapproximation:
- task: bitwiseOrUnsigned.c
settings: AutomizerC-forwardPredicates.epf
toolchain: AutomizerC.xml
- task: bitwiseOrUnsigned.c
settings: AutomizerC-forwardPredicates_const.epf
toolchain: AutomizerC.xml
- task: bitwiseOrUnsigned.c
settings: AutomizerC-nestedInterpolants.epf
toolchain: AutomizerC.xml
- task: bitwiseOrUnsigned.c
settings: AutomizerC-nestedInterpolants_const.epf
toolchain: AutomizerC.xml
- task: bitwiseOrUnsigned.c
settings: BlockEncodingV2AutomizerC-forwardPredicates.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: bitwiseOrUnsigned.c
settings: KojakC-Reach-32Bit-Default.epf
toolchain: KojakC.xml
- task: bitwiseOrUnsignedMinimal.c
settings: AutomizerC-forwardPredicates.epf
toolchain: AutomizerC.xml
- task: bitwiseOrUnsignedMinimal.c
settings: AutomizerC-forwardPredicates_const.epf
toolchain: AutomizerC.xml
- task: bitwiseOrUnsignedMinimal.c
settings: AutomizerC-nestedInterpolants.epf
toolchain: AutomizerC.xml
- task: bitwiseOrUnsignedMinimal.c
settings: AutomizerC-nestedInterpolants_const.epf
toolchain: AutomizerC.xml
- task: bitwiseOrUnsignedMinimal.c
settings: BlockEncodingV2AutomizerC-forwardPredicates.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: bitwiseOrUnsignedMinimal.c
settings: BlockEncodingV2AutomizerC-FP-MaxSaneBE.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: bitwiseOrUnsignedMinimal.c
settings: KojakC-Reach-32Bit-Default.epf
toolchain: KojakC.xml
- task: builtin_ffs.c
settings: AutomizerC-forwardPredicates.epf
toolchain: AutomizerC.xml
- task: builtin_ffs.c
settings: AutomizerC-forwardPredicates_const.epf
toolchain: AutomizerC.xml
- task: builtin_ffs.c
settings: AutomizerC-nestedInterpolants.epf
toolchain: AutomizerC.xml
- task: builtin_ffs.c
settings: AutomizerC-nestedInterpolants_const.epf
toolchain: AutomizerC.xml
- task: builtin_ffs.c
settings: BlockEncodingV2AutomizerC-forwardPredicates.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: builtin_ffs.c
settings: BlockEncodingV2AutomizerC-FP-MaxSaneBE.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: builtin_ffs.c
settings: KojakC-Reach-32Bit-Default.epf
toolchain: KojakC.xml
- task: BitwiseOperations02.c
settings: AutomizerC-forwardPredicates.epf
toolchain: AutomizerC.xml
- task: BitwiseOperations02.c
settings: AutomizerC-forwardPredicates_const.epf
toolchain: AutomizerC.xml
- task: BitwiseOperations02.c
settings: AutomizerC-nestedInterpolants.epf
toolchain: AutomizerC.xml
- task: BitwiseOperations02.c
settings: AutomizerC-nestedInterpolants_const.epf
toolchain: AutomizerC.xml
- task: BitwiseOperations02.c
settings: BlockEncodingV2AutomizerC-forwardPredicates.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: BitwiseOperations02.c
settings: KojakC-Reach-32Bit-Default.epf
toolchain: KojakC.xml

TIMEOUT:
- task: BitwiseOperations01.c
settings: BlockEncodingV2AutomizerC-FP-MaxSaneBE.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: BitwiseOperations02.c
settings: BlockEncodingV2AutomizerC-FP-MaxSaneBE.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: ShortCircuit-SideEffect-DoStatement-Safe.c
settings: AutomizerC-BitvectorTranslation.epf
toolchain: AutomizerC.xml
- task: ShortCircuit-SideEffect-ForStatement-Safe.c
settings: AutomizerC-BitvectorTranslation.epf
toolchain: AutomizerC.xml
- task: StructPositiveSum-Safe.c
settings: AutomizerC-BitvectorTranslation.epf
toolchain: AutomizerC.xml
- task: StructPositiveSum-Safe.c
settings: AutomizerC-forwardPredicates.epf
toolchain: AutomizerC.xml
- task: StructPositiveSum-Safe.c
settings: AutomizerC-forwardPredicates_const.epf
toolchain: AutomizerC.xml
- task: StructPositiveSum-Safe.c
settings: BlockEncodingV2AutomizerC-FP-MaxSaneBE.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: StructPositiveSum-Safe.c
settings: BlockEncodingV2AutomizerC-forwardPredicates.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: array10_pattern_simplified.c
settings: AutomizerC-BitvectorTranslation.epf
toolchain: AutomizerC.xml
- task: bitwiseOrUnsigned.c
settings: BlockEncodingV2AutomizerC-FP-MaxSaneBE.epf
toolchain: BlockEncodingV2AutomizerC.xml
- task: builtin_ffs.c
settings: BlockEncodingV2AutomizerC-FP-MaxSaneBE.epf
toolchain: BlockEncodingV2AutomizerC.xml

unable to decide satisfiability of path constraint:
- task: array10_pattern_simplified.c
settings: AutomizerC-nestedInterpolants.epf
toolchain: AutomizerC.xml
- task: array10_pattern_simplified.c
settings: AutomizerC-nestedInterpolants_const.epf
toolchain: AutomizerC.xml
10 changes: 10 additions & 0 deletions trunk/examples/programs/regression/c/interprocedural/.testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
TIMEOUT:
- task: Acsl01-EnsuresLocal-Safe.c
settings: AutomizerC-BitvectorTranslation.epf
toolchain: AutomizerC.xml
- task: Acsl03-EnsuresGlobal-Safe.c
settings: AutomizerC-BitvectorTranslation.epf
toolchain: AutomizerC.xml
- task: Tschingelhorn-Safe.c
settings: AutomizerC-BitvectorTranslation.epf
toolchain: AutomizerC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import de.uni_freiburg.informatik.ultimate.test.decider.ITestResultDecider;
import de.uni_freiburg.informatik.ultimate.test.decider.ITestResultDecider.TestResult;
import de.uni_freiburg.informatik.ultimate.test.junitextension.testfactory.FactoryTestMethod;
import de.uni_freiburg.informatik.ultimate.test.junitextension.testfactory.FactoryTestRunner.SkipTestException;
import de.uni_freiburg.informatik.ultimate.test.mocks.ConsoleLogger;
import de.uni_freiburg.informatik.ultimate.test.reporting.IIncrementalLog;
import de.uni_freiburg.informatik.ultimate.test.reporting.ITestLogfile;
Expand Down Expand Up @@ -124,7 +125,7 @@ public void test() {
final ILogger logger = getLoggerFromStarter(starter);
logger.info("Deciding this test: " + deciderName);
result = mDecider.getTestResult(starter.getServices());
if (!returnCode.isOK() && result != TestResult.FAIL) {
if (!returnCode.isOK() && result != TestResult.FAIL && result != TestResult.IGNORE) {
logger.fatal("#################### Overwriting decision of " + deciderName
+ " and setting test status to FAIL ####################");
logger.fatal("Ultimate returned an unexpected status:");
Expand Down Expand Up @@ -183,7 +184,12 @@ public void test() {
}
if (th != null) {
message += " (Ultimate threw an Exception: " + th.getMessage() + ")";
if (result == TestResult.IGNORE) {
skipTest(message, th);
Copy link
Member

Choose a reason for hiding this comment

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

are you sure its a good idea to throw a new exception and dont keep the old one? at least as wrapped exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maul-esel wrote this 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, so this was a long time ago, but: From my reading of the code, it seems like we (now) do keep the old exception th as a wrapped exception, right?

}
failTest(message, th);
} else if (result == TestResult.IGNORE) {
skipTest(message);
} else {
failTest(message);
}
Expand Down Expand Up @@ -266,6 +272,14 @@ private static void failTest(final String message, final Throwable th) throws Ul
throw exception;
}

private static void skipTest(final String message) {
throw new SkipTestException(message);
}

private static void skipTest(final String message, final Throwable cause) {
throw new SkipTestException(message, cause);
}

@Override
public int compareTo(final UltimateTestCase o) {
return mUltimateRunDefinition.compareTo(o.mUltimateRunDefinition);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ public enum TestResult {
/**
* Success should always represent a JUnit test success.
*/
SUCCESS
SUCCESS,
/**
* Marks a test as ignored
*/
IGNORE
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

package de.uni_freiburg.informatik.ultimate.test.decider;

import java.util.regex.Pattern;

import de.uni_freiburg.informatik.ultimate.core.lib.results.ExceptionOrErrorResult;
import de.uni_freiburg.informatik.ultimate.test.UltimateRunDefinition;
import de.uni_freiburg.informatik.ultimate.test.decider.expectedresult.IExpectedResultFinder;
Expand All @@ -38,8 +40,7 @@
import de.uni_freiburg.informatik.ultimate.test.util.TestUtil;

/**
* Use keywords in filename and first line to decide correctness of safety
* checker results.
* Use keywords in filename and first line to decide correctness of safety checker results.
*
* @author [email protected]
* @author Daniel Dietsch ([email protected])
Expand All @@ -50,19 +51,33 @@ public class SafetyCheckTestResultDecider extends ThreeTierTestResultDecider<Saf
/**
*
* @param ultimateRunDefinition
* @param unknownIsJUnitSuccess
* if true the TestResult UNKNOWN is a success for JUnit, if false, the TestResult UNKNOWN is a failure
* for JUnit.
*
* @param overridenExpectedVerdict
* The expected verdict overridden in a separate file, null if not present.
*/
public SafetyCheckTestResultDecider(final UltimateRunDefinition ultimateRunDefinition,
final boolean unknownIsJUnitSuccess, final String overridenExpectedVerdict) {
super(ultimateRunDefinition, unknownIsJUnitSuccess, overridenExpectedVerdict);
}

/**
*
* @param ultimateRunDefinition
* @param unknownIsJUnitSuccess
* if true the TestResult UNKNOWN is a success for JUnit, if
* false, the TestResult UNKNOWN is a failure for JUnit.
* if true the TestResult UNKNOWN is a success for JUnit, if false, the TestResult UNKNOWN is a failure
* for JUnit.
*/
public SafetyCheckTestResultDecider(final UltimateRunDefinition ultimateRunDefinition, final boolean unknownIsJUnitSuccess) {
public SafetyCheckTestResultDecider(final UltimateRunDefinition ultimateRunDefinition,
final boolean unknownIsJUnitSuccess) {
super(ultimateRunDefinition, unknownIsJUnitSuccess);
}

@Override
public IExpectedResultFinder<SafetyCheckerOverallResult> constructExpectedResultFinder() {
return new KeywordBasedExpectedResultFinder<>(
TestUtil.constructFilenameKeywordMap_AllSafetyChecker(), null,
return new KeywordBasedExpectedResultFinder<>(TestUtil.constructFilenameKeywordMap_AllSafetyChecker(), null,
TestUtil.constructFirstlineKeywordMap_SafetyChecker());
}

Expand All @@ -84,6 +99,19 @@ public class SafetyCheckerTestResultEvaluation implements ITestResultEvaluation<
@Override
public void evaluateTestResult(final IExpectedResultFinder<SafetyCheckerOverallResult> expectedResultFinder,
final IOverallResultEvaluator<SafetyCheckerOverallResult> overallResultDeterminer) {
if (mOverridenExpectedVerdict != null) {
final SafetyCheckerOverallResult overallResult = overallResultDeterminer.getOverallResult();
final String overallResultMsg = overallResultDeterminer.generateOverallResultMessage();
final Pattern pattern = Pattern.compile(mOverridenExpectedVerdict, Pattern.CASE_INSENSITIVE);
if (pattern.matcher(overallResult.toString()) != null || pattern.matcher(overallResultMsg) != null) {
mTestResult = TestResult.IGNORE;
} else {
mTestResult = TestResult.FAIL;
}
mCategory = overallResult + " (Expected to match :" + mOverridenExpectedVerdict + ")";
mMessage = " UltimateResult: " + overallResultMsg;
return;
}
evaluateExpectedResult(expectedResultFinder);
switch (expectedResultFinder.getExpectedResultFinderStatus()) {
case ERROR:
Expand Down
Loading