From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBG3I-0001RQ-Je for qemu-devel@nongnu.org; Wed, 25 Apr 2018 04:45:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBG3E-0007uU-IR for qemu-devel@nongnu.org; Wed, 25 Apr 2018 04:45:24 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:46138) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBG3E-0007u6-7l for qemu-devel@nongnu.org; Wed, 25 Apr 2018 04:45:20 -0400 Received: by mail-wr0-x244.google.com with SMTP id d1-v6so52443385wrj.13 for ; Wed, 25 Apr 2018 01:45:20 -0700 (PDT) References: <20180424152405.10304-1-alex.bennee@linaro.org> <20180424152405.10304-22-alex.bennee@linaro.org> <6470a208-c6e5-a8ba-ceb7-c3759c6ecd7b@amsat.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <6470a208-c6e5-a8ba-ceb7-c3759c6ecd7b@amsat.org> Date: Wed, 25 Apr 2018 09:45:17 +0100 Message-ID: <87in8fllnm.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 21/46] tests/tcg/i386: fix test-i386-fprem List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Cc: peter.maydell@linaro.org, cota@braap.org, famz@redhat.com, berrange@redhat.com, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de, qemu-devel@nongnu.org Philippe Mathieu-Daud=C3=A9 writes: > On 04/24/2018 12:23 PM, Alex Benn=C3=A9e wrote: >> Remove dependencies on QEMU's source tree and build directly. >> >> Signed-off-by: Alex Benn=C3=A9e >> --- >> tests/tcg/i386/test-i386-fprem.c | 12 +++++++++--- >> 1 file changed, 9 insertions(+), 3 deletions(-) >> >> diff --git a/tests/tcg/i386/test-i386-fprem.c b/tests/tcg/i386/test-i386= -fprem.c >> index 1a71623204..66f5a9657d 100644 >> --- a/tests/tcg/i386/test-i386-fprem.c >> +++ b/tests/tcg/i386/test-i386-fprem.c >> @@ -23,7 +23,10 @@ >> * along with this program; if not, see . >> */ >> >> -#include "qemu/osdep.h" >> +#include >> +#include >> + >> +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) >> >> /* >> * Inspired by 's union ieee854_long_double, but with single >> @@ -39,7 +42,7 @@ union float80u { >> unsigned int exponent:15; >> unsigned int negative:1; >> unsigned int empty:16; >> - } QEMU_PACKED ieee; >> + } __attribute__((packed)) ieee; >> >> /* This is for NaNs in the IEEE 854 double-extended-precision forma= t. */ >> struct { >> @@ -49,7 +52,7 @@ union float80u { >> unsigned int exponent:15; >> unsigned int negative:1; >> unsigned int empty:16; >> - } QEMU_PACKED ieee_nan; >> + } __attribute__((packed)) ieee_nan; >> }; >> >> #define IEEE854_LONG_DOUBLE_BIAS 0x3fff >> @@ -229,6 +232,7 @@ static void test_fprem_cases(void) >> do_fprem_stack_underflow(); >> >> printf("=3D invalid operation =3D\n"); >> + do_fprem(q_nan.d, 1.0); >> do_fprem(s_nan.d, 1.0); >> do_fprem(1.0, 0.0); >> do_fprem(pos_inf.d, 1.0); >> @@ -238,6 +242,8 @@ static void test_fprem_cases(void) >> do_fprem(pos_denorm.d, 1.0); >> do_fprem(1.0, pos_denorm.d); >> >> + do_fprem(smallest_positive_norm.d, smallest_positive_norm.d); >> + >> /* printf("=3D underflow =3D\n"); */ >> /* TODO: Is there a case where FPREM raises underflow? */ >> } >> > > This test is disabled in tests/tcg/i386/Makefile.target and it would be > nice to be able to run it without having to modify the Makefile, like > running "make SLOW=3D1" or "SPEED=3Dslow" like for iotests maybe? Sounds like a good idea. > > This test is too verbose and I wonder if we should redirect stdout to > /dev/null even for V=3D1. I think the original intention was to compare against a reference. Needless to say I think at the moment it's broken. > > Reviewed-by: Philippe Mathieu-Daud=C3=A9 > Enabled via tcg/i386/Makefile.target: > Tested-by: Philippe Mathieu-Daud=C3=A9 -- Alex Benn=C3=A9e