]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
none/tests/s390x/bfp-emit testcase: Assorted fixes.
authorFlorian Krohm <flo2030@eich-krohm.de>
Thu, 23 Oct 2025 22:35:27 +0000 (22:35 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Thu, 23 Oct 2025 22:35:27 +0000 (22:35 +0000)
Make function check_valgrind_output actually check something..
Remove --check-prereq logic. It is not needed. I think I was doing some
experiment of using objdump to make sure the insns written out by
valgrind match those produced by objdump. And then there was different
behaviour of objdump in different versions.

none/tests/s390x/bfp-emit.pl
none/tests/s390x/bfp-emit.vgtest

index a4e191b9efd59a6adfea384fd1901a38b9d709e2..66044971377022c1089cd456bd87ee795ca64c9d 100755 (executable)
@@ -74,16 +74,6 @@ my %insn_map = (
 
 sub main
 {
-    if ($#ARGV == 0 && $ARGV[0] eq "--check-prereq") {
-        my $stdout = `as --version`;
-        # GNU assembler (GNU Binutils for Ubuntu) 2.38
-        $stdout = (split /\n/, $stdout)[0];
-        $stdout =~ s/^[^0-9]+//;
-        my @v = split /\./, $stdout;
-        exit 0 if ($v[0] > 2 || ($v[0] == 2 && $v[1] >= 44));
-        exit 1;
-    }
-    
     #-----------------------------------------------------------------------
     # POP Chapter 9: Floating-Point Overview and Support Instructions
     #-----------------------------------------------------------------------
@@ -411,25 +401,24 @@ sub test_insn
 
 sub check_valgrind_output
 {
-    return 0;
     my ($mnm, $stdout) = @_;
 
     my @lines = split /\n/,$stdout;
     my $num_lines = scalar @lines;
 
-    if ($num_lines != 4) {
-        error("$mnm: Expected 4 lines; found $num_lines");
+    if ($num_lines != 2) {
+        error("$mnm: Expected 2 lines; found $num_lines");
         for my $line (@lines) {
             print "LINE |$line|\n";
         }
         return 1;
     }
-    if ($lines[0] !~ "Front end") {
+    if ($lines[0] !~ "Frontend") {
         error("$mnm: Unrecognised line |$lines[0]|");
         return 1;
     }
-    if ($lines[2] !~ "Assembly") {
-        error("$mnm: Unrecognised line |$lines[2]|");
+    if ($lines[1] !~ "Assembly") {
+        error("$mnm: Unrecognised line |$lines[1]|");
         return 1;
     }
     return 0;
index b6c6e5b06c074c1901bc5ea1a455102ea8887826..4bfcbac22833876be24ec5b91b85185f3bf6f16e 100644 (file)
@@ -1,3 +1,3 @@
-prereq: ./bfp-emit.pl --check-prereq && ../../../tests/s390x_features s390x-fpext
+prereq: ../../../tests/s390x_features s390x-fpext
 prog: /bin/true
 post: ./bfp-emit.pl