From bfabafd7b64de5f40f54020046b40bc4b627a48a Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 23 Oct 2025 22:35:27 +0000 Subject: [PATCH] none/tests/s390x/bfp-emit testcase: Assorted fixes. 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 | 21 +++++---------------- none/tests/s390x/bfp-emit.vgtest | 2 +- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/none/tests/s390x/bfp-emit.pl b/none/tests/s390x/bfp-emit.pl index a4e191b9e..660449713 100755 --- a/none/tests/s390x/bfp-emit.pl +++ b/none/tests/s390x/bfp-emit.pl @@ -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; diff --git a/none/tests/s390x/bfp-emit.vgtest b/none/tests/s390x/bfp-emit.vgtest index b6c6e5b06..4bfcbac22 100644 --- a/none/tests/s390x/bfp-emit.vgtest +++ b/none/tests/s390x/bfp-emit.vgtest @@ -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 -- 2.47.3