From b725330f5bddf08882ffb6d0db20b7d486280bf5 Mon Sep 17 00:00:00 2001
From: Patrick Baudin <patrick.baudin@cea.fr>
Date: Thu, 1 Oct 2020 15:24:38 +0200
Subject: [PATCH] adds src/plugins/loop_analysis/tests

---
 Makefile                                      |   6 +-
 src/plugins/loop_analysis/.gitignore          |   2 +-
 .../oracle/mixed_output.res.oracle            |   2 +-
 .../tests/loop_analysis/oracle/ne.res.oracle  |  26 +-
 .../oracle/non_natural_loop.res.oracle        |   5 +-
 .../oracle/non_natural_loop2.res.oracle       |   5 +-
 .../oracle/slevel_overflow.res.oracle         |   2 +-
 .../oracle/small_loop.0.res.oracle            |   2 +-
 .../oracle/small_loop.1.res.oracle            |   2 +-
 .../loop_analysis/oracle/test.0.res.oracle    |   2 +-
 .../loop_analysis/oracle/test.1.res.oracle    |   2 +-
 .../oracle/with_value.res.oracle              | 242 +++++++++---------
 .../tests/loop_analysis/with_value.i          |   4 +-
 src/plugins/loop_analysis/tests/ptests_config |   1 +
 src/plugins/loop_analysis/tests/test_config   |   3 +-
 15 files changed, 154 insertions(+), 152 deletions(-)
 create mode 100644 src/plugins/loop_analysis/tests/ptests_config

diff --git a/Makefile b/Makefile
index 4a91b5702ff..7a520baa142 100644
--- a/Makefile
+++ b/Makefile
@@ -170,12 +170,14 @@ force-reconfigure:
 
 TESTS=builtins callgraph cil constant_propagation float idct impact jcdb journal libc metrics misc occurrence pdg rte rte_manual scope slicing sparecode spec syntax test value
 
-PLUGIN_TESTS= dive
+PLUGIN_TESTS= dive loop_analysis
 
 tests: config.sed
 	find tests $(addprefix src/plugins/,$(addsuffix /tests,$(PLUGIN_TESTS))) -name dune | grep -e "oracle.*/\|result.*/" | xargs --no-run-if-empty rm
 	dune exec -- ptests/ptests.exe
-	dune exec -- ptests/ptests.exe $(addprefix src/plugins/,$(addsuffix /tests/,$(PLUGIN_TESTS)))
+	for plugin in $(PLUGIN_TESTS); do \
+		dune exec -- ptests/ptests.exe src/plugins/$$plugin/tests; \
+	done
 	dune build $(addprefix @tests/,$(addsuffix /ptests,$(TESTS)))
 	dune build $(addprefix @src/plugins/,$(addsuffix /tests/ptests,$(PLUGIN_TESTS)))
 
diff --git a/src/plugins/loop_analysis/.gitignore b/src/plugins/loop_analysis/.gitignore
index 0114e3d0f08..3a98458e917 100644
--- a/src/plugins/loop_analysis/.gitignore
+++ b/src/plugins/loop_analysis/.gitignore
@@ -1,4 +1,4 @@
 /configure
 /Makefile
-/tests/ptests_config
 /tests/*/result
+/tests/**/dune
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/mixed_output.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/mixed_output.res.oracle
index ca741cf1c77..154dac8900f 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/mixed_output.res.oracle
+++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/mixed_output.res.oracle
@@ -1,4 +1,4 @@
-[kernel] Parsing tests/loop_analysis/mixed_output.i (no preprocessing)
+[kernel] Parsing mixed_output.i (no preprocessing)
 [loop] Functions with loops whose bounds we could not find:
   loop_inf
   loop_inf2
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/ne.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/ne.res.oracle
index 415f11cf56c..9f76acb8414 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/ne.res.oracle
+++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/ne.res.oracle
@@ -1,38 +1,38 @@
-[kernel] Parsing tests/loop_analysis/ne.i (no preprocessing)
-[loop] tests/loop_analysis/ne.i:38: Warning: 
+[kernel] Parsing ne.i (no preprocessing)
+[loop] ne.i:38: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != 7; i += 2)
-[loop] tests/loop_analysis/ne.i:46: Warning: 
+[loop] ne.i:46: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != -9; i -= 2)
-[loop] tests/loop_analysis/ne.i:54: Warning: 
+[loop] ne.i:54: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != 18; i += 15)
-[loop] tests/loop_analysis/ne.i:62: Warning: 
+[loop] ne.i:62: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != -5; i -= 15)
-[loop] tests/loop_analysis/ne.i:70: Warning: 
+[loop] ne.i:70: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != 3; i += 2)
-[loop] tests/loop_analysis/ne.i:78: Warning: 
+[loop] ne.i:78: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != -11; i -= 2)
-[loop] tests/loop_analysis/ne.i:86: Warning: 
+[loop] ne.i:86: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != 25; i += 15)
-[loop] tests/loop_analysis/ne.i:94: Warning: 
+[loop] ne.i:94: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != -35; i -= 15)
-[loop] tests/loop_analysis/ne.i:103: Warning: 
+[loop] ne.i:103: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != 7; i -= 2)
-[loop] tests/loop_analysis/ne.i:111: Warning: 
+[loop] ne.i:111: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != -9; i += 2)
-[loop] tests/loop_analysis/ne.i:119: Warning: 
+[loop] ne.i:119: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != 18; i -= 15)
-[loop] tests/loop_analysis/ne.i:127: Warning: 
+[loop] ne.i:127: Warning: 
   termination condition may not be reached (infinite loop?)
   loop amounts to: for (i = 0; i != -5; i += 15)
 [loop] Functions with loops whose bounds we could not find:
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/non_natural_loop.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/non_natural_loop.res.oracle
index 9da39d23e3e..67228ba2e4d 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/non_natural_loop.res.oracle
+++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/non_natural_loop.res.oracle
@@ -1,6 +1,5 @@
-[kernel] Parsing tests/loop_analysis/non_natural_loop.i (no preprocessing)
-[kernel] tests/loop_analysis/non_natural_loop.i:4: Warning: 
-  Non-natural loop detected.
+[kernel] Parsing non_natural_loop.i (no preprocessing)
+[kernel] non_natural_loop.i:4: Warning: Non-natural loop detected.
 [loop] Warning: Could not analyze function duff;
   it contains a non-natural loop
 [loop] Add this to your command line:
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/non_natural_loop2.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/non_natural_loop2.res.oracle
index fdef320cf5e..4eb75dfefce 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/non_natural_loop2.res.oracle
+++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/non_natural_loop2.res.oracle
@@ -1,6 +1,5 @@
-[kernel] Parsing tests/loop_analysis/non_natural_loop2.i (no preprocessing)
-[kernel] tests/loop_analysis/non_natural_loop2.i:4: Warning: 
-  Non-natural loop detected.
+[kernel] Parsing non_natural_loop2.i (no preprocessing)
+[kernel] non_natural_loop2.i:4: Warning: Non-natural loop detected.
 [loop] Warning: Could not analyze function main;
   it contains a non-natural loop
 [loop] Add this to your command line:
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/slevel_overflow.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/slevel_overflow.res.oracle
index c12264a63be..8a5da7dc963 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/slevel_overflow.res.oracle
+++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/slevel_overflow.res.oracle
@@ -1,4 +1,4 @@
-[kernel] Parsing tests/loop_analysis/slevel_overflow.c (with preprocessing)
+[kernel] Parsing slevel_overflow.c (with preprocessing)
 [loop] Functions with loops whose estimated bounds were larger than -loop-max-slevel
   (we recommend setting their slevel to 0 to avoid wasting time):
   f2 (estimated bounds: 16777216000000000000000)
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/small_loop.0.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/small_loop.0.res.oracle
index 5ab62cc0696..a8fbd64ebd5 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/small_loop.0.res.oracle
+++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/small_loop.0.res.oracle
@@ -1,4 +1,4 @@
-[kernel] Parsing tests/loop_analysis/small_loop.i (no preprocessing)
+[kernel] Parsing small_loop.i (no preprocessing)
 [loop] Add this to your command line:
   -val-slevel-merge-after-loop main \
   -slevel-function main:20
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/small_loop.1.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/small_loop.1.res.oracle
index 5ab62cc0696..a8fbd64ebd5 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/small_loop.1.res.oracle
+++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/small_loop.1.res.oracle
@@ -1,4 +1,4 @@
-[kernel] Parsing tests/loop_analysis/small_loop.i (no preprocessing)
+[kernel] Parsing small_loop.i (no preprocessing)
 [loop] Add this to your command line:
   -val-slevel-merge-after-loop main \
   -slevel-function main:20
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/test.0.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/test.0.res.oracle
index 923695413d0..df2ce032de5 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/test.0.res.oracle
+++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/test.0.res.oracle
@@ -1,4 +1,4 @@
-[kernel] Parsing tests/loop_analysis/test.i (no preprocessing)
+[kernel] Parsing test.i (no preprocessing)
 [loop] Functions with loops whose bounds we could not find:
   g
   h6
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/test.1.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/test.1.res.oracle
index 887aa01c9d3..e4f09ad4802 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/test.1.res.oracle
+++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/test.1.res.oracle
@@ -1,4 +1,4 @@
-[kernel] Parsing tests/loop_analysis/test.i (no preprocessing)
+[kernel] Parsing test.i (no preprocessing)
 [loop] Functions with loops whose bounds we could not find:
   g
   h6
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/oracle/with_value.res.oracle b/src/plugins/loop_analysis/tests/loop_analysis/oracle/with_value.res.oracle
index 2532c0705de..c00e4f19152 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/oracle/with_value.res.oracle
+++ b/src/plugins/loop_analysis/tests/loop_analysis/oracle/with_value.res.oracle
@@ -1,319 +1,319 @@
-[kernel] Parsing tests/loop_analysis/with_value.i (no preprocessing)
+[kernel] Parsing with_value.i (no preprocessing)
 [eva] Analyzing a complete application starting at main
 [eva] Computing initial state
 [eva] Initial state computed
 [eva:initial-state] Values of globals at initialization
   nondet ∈ [--..--]
 [eva] computing for function f1 <- main.
-  Called from tests/loop_analysis/with_value.i:187.
-[eva] tests/loop_analysis/with_value.i:6: starting to merge loop iterations
+  Called from with_value.i:187.
+[eva] with_value.i:6: starting to merge loop iterations
 [eva] Recording results for f1
 [eva] Done for function f1
 [eva] computing for function f2 <- main.
-  Called from tests/loop_analysis/with_value.i:188.
-[eva] tests/loop_analysis/with_value.i:10: starting to merge loop iterations
+  Called from with_value.i:188.
+[eva] with_value.i:10: starting to merge loop iterations
 [eva] Recording results for f2
 [eva] Done for function f2
 [eva] computing for function f3 <- main.
-  Called from tests/loop_analysis/with_value.i:189.
-[eva] tests/loop_analysis/with_value.i:14: starting to merge loop iterations
+  Called from with_value.i:189.
+[eva] with_value.i:14: starting to merge loop iterations
 [eva] Recording results for f3
 [eva] Done for function f3
 [eva] computing for function f4 <- main.
-  Called from tests/loop_analysis/with_value.i:190.
-[eva] tests/loop_analysis/with_value.i:18: starting to merge loop iterations
+  Called from with_value.i:190.
+[eva] with_value.i:18: starting to merge loop iterations
 [eva] Recording results for f4
 [eva] Done for function f4
 [eva] computing for function f5 <- main.
-  Called from tests/loop_analysis/with_value.i:191.
-[eva] tests/loop_analysis/with_value.i:22: starting to merge loop iterations
+  Called from with_value.i:191.
+[eva] with_value.i:22: starting to merge loop iterations
 [eva] Recording results for f5
 [eva] Done for function f5
 [eva] computing for function f6 <- main.
-  Called from tests/loop_analysis/with_value.i:192.
-[eva] tests/loop_analysis/with_value.i:26: starting to merge loop iterations
+  Called from with_value.i:192.
+[eva] with_value.i:26: starting to merge loop iterations
 [eva] Recording results for f6
 [eva] Done for function f6
 [eva] computing for function f7 <- main.
-  Called from tests/loop_analysis/with_value.i:193.
-[eva] tests/loop_analysis/with_value.i:30: starting to merge loop iterations
+  Called from with_value.i:193.
+[eva] with_value.i:30: starting to merge loop iterations
 [eva] Recording results for f7
 [eva] Done for function f7
 [eva] computing for function f8 <- main.
-  Called from tests/loop_analysis/with_value.i:194.
-[eva] tests/loop_analysis/with_value.i:34: starting to merge loop iterations
+  Called from with_value.i:194.
+[eva] with_value.i:34: starting to merge loop iterations
 [eva] Recording results for f8
 [eva] Done for function f8
 [eva] computing for function g1 <- main.
-  Called from tests/loop_analysis/with_value.i:195.
-[eva:alarm] tests/loop_analysis/with_value.i:38: Warning: 
+  Called from with_value.i:195.
+[eva:alarm] with_value.i:38: Warning: 
   signed overflow. assert n + 2 ≤ 2147483647;
-[eva] tests/loop_analysis/with_value.i:38: starting to merge loop iterations
+[eva] with_value.i:38: starting to merge loop iterations
 [eva] Recording results for g1
 [eva] Done for function g1
 [eva] computing for function g2 <- main.
-  Called from tests/loop_analysis/with_value.i:196.
-[eva:alarm] tests/loop_analysis/with_value.i:42: Warning: 
+  Called from with_value.i:196.
+[eva:alarm] with_value.i:42: Warning: 
   signed overflow. assert n + 2 ≤ 2147483647;
-[eva] tests/loop_analysis/with_value.i:42: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:42: Warning: 
+[eva] with_value.i:42: starting to merge loop iterations
+[eva:alarm] with_value.i:42: Warning: 
   signed overflow. assert i + 1 ≤ 2147483647;
 [eva] Recording results for g2
 [eva] Done for function g2
 [eva] computing for function g3 <- main.
-  Called from tests/loop_analysis/with_value.i:197.
-[eva:alarm] tests/loop_analysis/with_value.i:46: Warning: 
+  Called from with_value.i:197.
+[eva:alarm] with_value.i:46: Warning: 
   signed overflow. assert n + 2 ≤ 2147483647;
-[eva] tests/loop_analysis/with_value.i:46: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:46: Warning: 
+[eva] with_value.i:46: starting to merge loop iterations
+[eva:alarm] with_value.i:46: Warning: 
   signed overflow. assert i + 1 ≤ 2147483647;
 [eva] Recording results for g3
 [eva] Done for function g3
 [eva] computing for function g4 <- main.
-  Called from tests/loop_analysis/with_value.i:198.
-[eva:alarm] tests/loop_analysis/with_value.i:50: Warning: 
+  Called from with_value.i:198.
+[eva:alarm] with_value.i:50: Warning: 
   signed overflow. assert n + 2 ≤ 2147483647;
-[eva] tests/loop_analysis/with_value.i:50: starting to merge loop iterations
+[eva] with_value.i:50: starting to merge loop iterations
 [eva] Recording results for g4
 [eva] Done for function g4
 [eva] computing for function g5 <- main.
-  Called from tests/loop_analysis/with_value.i:199.
-[eva:alarm] tests/loop_analysis/with_value.i:54: Warning: 
+  Called from with_value.i:199.
+[eva:alarm] with_value.i:54: Warning: 
   signed overflow. assert n + 2 ≤ 2147483647;
 [eva] Recording results for g5
 [eva] Done for function g5
 [eva] computing for function g6 <- main.
-  Called from tests/loop_analysis/with_value.i:200.
-[eva:alarm] tests/loop_analysis/with_value.i:58: Warning: 
+  Called from with_value.i:200.
+[eva:alarm] with_value.i:58: Warning: 
   signed overflow. assert n + 2 ≤ 2147483647;
 [eva] Recording results for g6
 [eva] Done for function g6
 [eva] computing for function g7 <- main.
-  Called from tests/loop_analysis/with_value.i:201.
-[eva:alarm] tests/loop_analysis/with_value.i:62: Warning: 
+  Called from with_value.i:201.
+[eva:alarm] with_value.i:62: Warning: 
   signed overflow. assert n + 2 ≤ 2147483647;
 [eva] Recording results for g7
 [eva] Done for function g7
 [eva] computing for function g8 <- main.
-  Called from tests/loop_analysis/with_value.i:202.
-[eva:alarm] tests/loop_analysis/with_value.i:66: Warning: 
+  Called from with_value.i:202.
+[eva:alarm] with_value.i:66: Warning: 
   signed overflow. assert n + 2 ≤ 2147483647;
 [eva] Recording results for g8
 [eva] Done for function g8
 [eva] computing for function h1 <- main.
-  Called from tests/loop_analysis/with_value.i:203.
-[eva] tests/loop_analysis/with_value.i:70: starting to merge loop iterations
+  Called from with_value.i:203.
+[eva] with_value.i:70: starting to merge loop iterations
 [eva] Recording results for h1
 [eva] Done for function h1
 [eva] computing for function h1 <- main.
-  Called from tests/loop_analysis/with_value.i:204.
+  Called from with_value.i:204.
 [eva] Recording results for h1
 [eva] Done for function h1
 [eva] computing for function h2 <- main.
-  Called from tests/loop_analysis/with_value.i:205.
-[eva] tests/loop_analysis/with_value.i:74: starting to merge loop iterations
+  Called from with_value.i:205.
+[eva] with_value.i:74: starting to merge loop iterations
 [eva] Recording results for h2
 [eva] Done for function h2
 [eva] computing for function h2 <- main.
-  Called from tests/loop_analysis/with_value.i:206.
+  Called from with_value.i:206.
 [eva] Recording results for h2
 [eva] Done for function h2
 [eva] computing for function h3 <- main.
-  Called from tests/loop_analysis/with_value.i:207.
-[eva] tests/loop_analysis/with_value.i:78: starting to merge loop iterations
+  Called from with_value.i:207.
+[eva] with_value.i:78: starting to merge loop iterations
 [eva] Recording results for h3
 [eva] Done for function h3
 [eva] computing for function h3 <- main.
-  Called from tests/loop_analysis/with_value.i:208.
+  Called from with_value.i:208.
 [eva] Recording results for h3
 [eva] Done for function h3
 [eva] computing for function h4 <- main.
-  Called from tests/loop_analysis/with_value.i:209.
-[eva] tests/loop_analysis/with_value.i:82: starting to merge loop iterations
+  Called from with_value.i:209.
+[eva] with_value.i:82: starting to merge loop iterations
 [eva] Recording results for h4
 [eva] Done for function h4
 [eva] computing for function h4 <- main.
-  Called from tests/loop_analysis/with_value.i:210.
+  Called from with_value.i:210.
 [eva] Recording results for h4
 [eva] Done for function h4
 [eva] computing for function h5 <- main.
-  Called from tests/loop_analysis/with_value.i:211.
-[eva] tests/loop_analysis/with_value.i:86: starting to merge loop iterations
+  Called from with_value.i:211.
+[eva] with_value.i:86: starting to merge loop iterations
 [eva] Recording results for h5
 [eva] Done for function h5
 [eva] computing for function h5 <- main.
-  Called from tests/loop_analysis/with_value.i:212.
+  Called from with_value.i:212.
 [eva] Recording results for h5
 [eva] Done for function h5
 [eva] computing for function h6 <- main.
-  Called from tests/loop_analysis/with_value.i:213.
-[eva] tests/loop_analysis/with_value.i:90: starting to merge loop iterations
+  Called from with_value.i:213.
+[eva] with_value.i:90: starting to merge loop iterations
 [eva] Recording results for h6
 [eva] Done for function h6
 [eva] computing for function h6 <- main.
-  Called from tests/loop_analysis/with_value.i:214.
+  Called from with_value.i:214.
 [eva] Recording results for h6
 [eva] Done for function h6
 [eva] computing for function h7 <- main.
-  Called from tests/loop_analysis/with_value.i:215.
-[eva] tests/loop_analysis/with_value.i:94: starting to merge loop iterations
+  Called from with_value.i:215.
+[eva] with_value.i:94: starting to merge loop iterations
 [eva] Recording results for h7
 [eva] Done for function h7
 [eva] computing for function h7 <- main.
-  Called from tests/loop_analysis/with_value.i:216.
+  Called from with_value.i:216.
 [eva] Recording results for h7
 [eva] Done for function h7
 [eva] computing for function h8 <- main.
-  Called from tests/loop_analysis/with_value.i:217.
-[eva] tests/loop_analysis/with_value.i:98: starting to merge loop iterations
+  Called from with_value.i:217.
+[eva] with_value.i:98: starting to merge loop iterations
 [eva] Recording results for h8
 [eva] Done for function h8
 [eva] computing for function h8 <- main.
-  Called from tests/loop_analysis/with_value.i:218.
+  Called from with_value.i:218.
 [eva] Recording results for h8
 [eva] Done for function h8
 [eva] computing for function i1 <- main.
-  Called from tests/loop_analysis/with_value.i:219.
-[eva] tests/loop_analysis/with_value.i:102: starting to merge loop iterations
+  Called from with_value.i:219.
+[eva] with_value.i:102: starting to merge loop iterations
 [eva] Recording results for i1
 [eva] Done for function i1
 [eva] computing for function i2 <- main.
-  Called from tests/loop_analysis/with_value.i:220.
-[eva] tests/loop_analysis/with_value.i:106: starting to merge loop iterations
+  Called from with_value.i:220.
+[eva] with_value.i:106: starting to merge loop iterations
 [eva] Recording results for i2
 [eva] Done for function i2
 [eva] computing for function i3 <- main.
-  Called from tests/loop_analysis/with_value.i:221.
-[eva] tests/loop_analysis/with_value.i:110: starting to merge loop iterations
+  Called from with_value.i:221.
+[eva] with_value.i:110: starting to merge loop iterations
 [eva] Recording results for i3
 [eva] Done for function i3
 [eva] computing for function i4 <- main.
-  Called from tests/loop_analysis/with_value.i:222.
-[eva] tests/loop_analysis/with_value.i:114: starting to merge loop iterations
+  Called from with_value.i:222.
+[eva] with_value.i:114: starting to merge loop iterations
 [eva] Recording results for i4
 [eva] Done for function i4
 [eva] computing for function j1 <- main.
-  Called from tests/loop_analysis/with_value.i:223.
-[eva] tests/loop_analysis/with_value.i:118: starting to merge loop iterations
+  Called from with_value.i:223.
+[eva] with_value.i:118: starting to merge loop iterations
 [eva] Recording results for j1
 [eva] Done for function j1
 [eva] computing for function j2 <- main.
-  Called from tests/loop_analysis/with_value.i:224.
-[eva] tests/loop_analysis/with_value.i:122: starting to merge loop iterations
+  Called from with_value.i:224.
+[eva] with_value.i:122: starting to merge loop iterations
 [eva] Recording results for j2
 [eva] Done for function j2
 [eva] computing for function j3 <- main.
-  Called from tests/loop_analysis/with_value.i:225.
+  Called from with_value.i:225.
 [eva] Recording results for j3
 [eva] Done for function j3
 [eva] computing for function j4 <- main.
-  Called from tests/loop_analysis/with_value.i:226.
+  Called from with_value.i:226.
 [eva] Recording results for j4
 [eva] Done for function j4
 [eva] computing for function j1 <- main.
-  Called from tests/loop_analysis/with_value.i:227.
+  Called from with_value.i:227.
 [eva] Recording results for j1
 [eva] Done for function j1
 [eva] computing for function j2 <- main.
-  Called from tests/loop_analysis/with_value.i:228.
+  Called from with_value.i:228.
 [eva] Recording results for j2
 [eva] Done for function j2
 [eva] computing for function j3 <- main.
-  Called from tests/loop_analysis/with_value.i:229.
-[eva] tests/loop_analysis/with_value.i:126: starting to merge loop iterations
+  Called from with_value.i:229.
+[eva] with_value.i:126: starting to merge loop iterations
 [eva] Recording results for j3
 [eva] Done for function j3
 [eva] computing for function j4 <- main.
-  Called from tests/loop_analysis/with_value.i:230.
-[eva] tests/loop_analysis/with_value.i:130: starting to merge loop iterations
+  Called from with_value.i:230.
+[eva] with_value.i:130: starting to merge loop iterations
 [eva] Recording results for j4
 [eva] Done for function j4
 [eva] computing for function f2_u_const <- main.
-  Called from tests/loop_analysis/with_value.i:232.
-[eva] tests/loop_analysis/with_value.i:134: starting to merge loop iterations
+  Called from with_value.i:232.
+[eva] with_value.i:134: starting to merge loop iterations
 [eva] Recording results for f2_u_const
 [eva] Done for function f2_u_const
 [eva] computing for function ne1 <- main.
-  Called from tests/loop_analysis/with_value.i:234.
-[eva] tests/loop_analysis/with_value.i:138: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:138: Warning: 
+  Called from with_value.i:234.
+[eva] with_value.i:138: starting to merge loop iterations
+[eva:alarm] with_value.i:138: Warning: 
   signed overflow. assert i + 4 ≤ 2147483647;
 [eva] Recording results for ne1
 [eva] Done for function ne1
 [eva] computing for function ne2 <- main.
-  Called from tests/loop_analysis/with_value.i:235.
-[eva] tests/loop_analysis/with_value.i:142: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:142: Warning: 
+  Called from with_value.i:235.
+[eva] with_value.i:142: starting to merge loop iterations
+[eva:alarm] with_value.i:142: Warning: 
   signed overflow. assert i + 4 ≤ 2147483647;
 [eva] Recording results for ne2
 [eva] Done for function ne2
 [eva] computing for function ne3 <- main.
-  Called from tests/loop_analysis/with_value.i:236.
-[eva] tests/loop_analysis/with_value.i:146: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:146: Warning: 
+  Called from with_value.i:236.
+[eva] with_value.i:146: starting to merge loop iterations
+[eva:alarm] with_value.i:146: Warning: 
   signed overflow. assert -2147483648 ≤ i - 1;
 [eva] Recording results for ne3
 [eva] Done for function ne3
 [eva] computing for function ne4 <- main.
-  Called from tests/loop_analysis/with_value.i:237.
-[eva] tests/loop_analysis/with_value.i:150: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:150: Warning: 
+  Called from with_value.i:237.
+[eva] with_value.i:150: starting to merge loop iterations
+[eva:alarm] with_value.i:150: Warning: 
   signed overflow. assert -2147483648 ≤ i - 1;
 [eva] Recording results for ne4
 [eva] Done for function ne4
 [eva] computing for function nev1 <- main.
-  Called from tests/loop_analysis/with_value.i:238.
-[eva] tests/loop_analysis/with_value.i:154: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:154: Warning: 
+  Called from with_value.i:238.
+[eva] with_value.i:154: starting to merge loop iterations
+[eva:alarm] with_value.i:154: Warning: 
   signed overflow. assert i + 4 ≤ 2147483647;
 [eva] Recording results for nev1
 [eva] Done for function nev1
 [eva] computing for function nev2 <- main.
-  Called from tests/loop_analysis/with_value.i:239.
-[eva] tests/loop_analysis/with_value.i:158: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:158: Warning: 
+  Called from with_value.i:239.
+[eva] with_value.i:158: starting to merge loop iterations
+[eva:alarm] with_value.i:158: Warning: 
   signed overflow. assert i + 4 ≤ 2147483647;
 [eva] Recording results for nev2
 [eva] Done for function nev2
 [eva] computing for function nev3 <- main.
-  Called from tests/loop_analysis/with_value.i:240.
-[eva] tests/loop_analysis/with_value.i:162: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:162: Warning: 
+  Called from with_value.i:240.
+[eva] with_value.i:162: starting to merge loop iterations
+[eva:alarm] with_value.i:162: Warning: 
   signed overflow. assert -2147483648 ≤ i - 1;
 [eva] Recording results for nev3
 [eva] Done for function nev3
 [eva] computing for function nev4 <- main.
-  Called from tests/loop_analysis/with_value.i:241.
-[eva] tests/loop_analysis/with_value.i:166: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:166: Warning: 
+  Called from with_value.i:241.
+[eva] with_value.i:166: starting to merge loop iterations
+[eva:alarm] with_value.i:166: Warning: 
   signed overflow. assert -2147483648 ≤ i - 1;
 [eva] Recording results for nev4
 [eva] Done for function nev4
 [eva] computing for function nev5 <- main.
-  Called from tests/loop_analysis/with_value.i:242.
-[eva] tests/loop_analysis/with_value.i:170: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:170: Warning: 
+  Called from with_value.i:242.
+[eva] with_value.i:170: starting to merge loop iterations
+[eva:alarm] with_value.i:170: Warning: 
   signed overflow. assert i + 4 ≤ 2147483647;
 [eva] Recording results for nev5
 [eva] Done for function nev5
 [eva] computing for function nev6 <- main.
-  Called from tests/loop_analysis/with_value.i:243.
-[eva] tests/loop_analysis/with_value.i:174: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:174: Warning: 
+  Called from with_value.i:243.
+[eva] with_value.i:174: starting to merge loop iterations
+[eva:alarm] with_value.i:174: Warning: 
   signed overflow. assert i + 4 ≤ 2147483647;
 [eva] Recording results for nev6
 [eva] Done for function nev6
 [eva] computing for function nev7 <- main.
-  Called from tests/loop_analysis/with_value.i:244.
-[eva] tests/loop_analysis/with_value.i:178: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:178: Warning: 
+  Called from with_value.i:244.
+[eva] with_value.i:178: starting to merge loop iterations
+[eva:alarm] with_value.i:178: Warning: 
   signed overflow. assert -2147483648 ≤ i - 1;
 [eva] Recording results for nev7
 [eva] Done for function nev7
 [eva] computing for function nev8 <- main.
-  Called from tests/loop_analysis/with_value.i:245.
-[eva] tests/loop_analysis/with_value.i:182: starting to merge loop iterations
-[eva:alarm] tests/loop_analysis/with_value.i:182: Warning: 
+  Called from with_value.i:245.
+[eva] with_value.i:182: starting to merge loop iterations
+[eva:alarm] with_value.i:182: Warning: 
   signed overflow. assert -2147483648 ≤ i - 1;
 [eva] Recording results for nev8
 [eva] Done for function nev8
diff --git a/src/plugins/loop_analysis/tests/loop_analysis/with_value.i b/src/plugins/loop_analysis/tests/loop_analysis/with_value.i
index b030fa5e58d..e617361189a 100644
--- a/src/plugins/loop_analysis/tests/loop_analysis/with_value.i
+++ b/src/plugins/loop_analysis/tests/loop_analysis/with_value.i
@@ -1,7 +1,7 @@
 /*run.config
-OPT: -no-autoload-plugins -load-module from,inout,loopanalysis,eva,scope -eva -eva-show-progress -then -loop
+PLUGIN: from inout eva scope
+OPT: -eva -eva-show-progress -then -loop
 */
-
 void f1(int n) {
   for (int i = 1; i < n+2; i++); // i IN [1..6] (6)
 }
diff --git a/src/plugins/loop_analysis/tests/ptests_config b/src/plugins/loop_analysis/tests/ptests_config
new file mode 100644
index 00000000000..95b27561f78
--- /dev/null
+++ b/src/plugins/loop_analysis/tests/ptests_config
@@ -0,0 +1 @@
+DEFAULT_SUITES= loop_analysis
diff --git a/src/plugins/loop_analysis/tests/test_config b/src/plugins/loop_analysis/tests/test_config
index 4d0023c2747..38f5a9cf0d3 100644
--- a/src/plugins/loop_analysis/tests/test_config
+++ b/src/plugins/loop_analysis/tests/test_config
@@ -1 +1,2 @@
-OPT: -no-autoload-plugins -load-module loopanalysis -loop
+PLUGIN: loop-analysis
+OPT: -loop
-- 
GitLab