* [Qemu-devel] [PATCH 1/6] tests/tcg/test_path.c: include utils/bufferiszero.c
2017-08-02 20:15 [Qemu-devel] [PATCH 0/6] Enable building and running tcg tests on i386 Cleber Rosa
@ 2017-08-02 20:15 ` Cleber Rosa
2017-08-02 21:36 ` Philippe Mathieu-Daudé
2017-08-02 20:15 ` [Qemu-devel] [PATCH 2/6] tests/tcg/linux-test.c: remove unused include of "qemu/cutils.h" Cleber Rosa
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Cleber Rosa @ 2017-08-02 20:15 UTC (permalink / raw)
To: qemu-devel; +Cc: Cleber Rosa
Which contains one specific function used by iov.c.
Without this, "make -C tests/tcg test_path" (and consequently
"make -C tests/tcg" or simply "make test") fails quite early.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/tcg/test_path.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c
index 1c29bce..74dbdaf 100644
--- a/tests/tcg/test_path.c
+++ b/tests/tcg/test_path.c
@@ -3,6 +3,7 @@
#include "util/cutils.c"
#include "util/hexdump.c"
#include "util/iov.c"
+#include "util/bufferiszero.c"
#include "util/path.c"
#include "util/qemu-timer-common.c"
#include <stdarg.h>
--
2.9.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/6] tests/tcg/test_path.c: include utils/bufferiszero.c
2017-08-02 20:15 ` [Qemu-devel] [PATCH 1/6] tests/tcg/test_path.c: include utils/bufferiszero.c Cleber Rosa
@ 2017-08-02 21:36 ` Philippe Mathieu-Daudé
2017-08-02 22:24 ` Cleber Rosa
0 siblings, 1 reply; 12+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-08-02 21:36 UTC (permalink / raw)
To: Cleber Rosa, qemu-devel
Hi Cleber,
On 08/02/2017 05:15 PM, Cleber Rosa wrote:
> Which contains one specific function used by iov.c.
>
> Without this, "make -C tests/tcg test_path" (and consequently
> "make -C tests/tcg" or simply "make test") fails quite early.
>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
> tests/tcg/test_path.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c
> index 1c29bce..74dbdaf 100644
> --- a/tests/tcg/test_path.c
> +++ b/tests/tcg/test_path.c
> @@ -3,6 +3,7 @@
> #include "util/cutils.c"
> #include "util/hexdump.c"
> #include "util/iov.c"
> +#include "util/bufferiszero.c"
This fixes the build, however why not take this opportunity to fix it
through the Makefile instead of including .c?
Regards,
Phil.
> #include "util/path.c"
> #include "util/qemu-timer-common.c"
> #include <stdarg.h>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/6] tests/tcg/test_path.c: include utils/bufferiszero.c
2017-08-02 21:36 ` Philippe Mathieu-Daudé
@ 2017-08-02 22:24 ` Cleber Rosa
2017-08-17 13:26 ` Cleber Rosa
0 siblings, 1 reply; 12+ messages in thread
From: Cleber Rosa @ 2017-08-02 22:24 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]
On 08/02/2017 05:36 PM, Philippe Mathieu-Daudé wrote:
> Hi Cleber,
>
> On 08/02/2017 05:15 PM, Cleber Rosa wrote:
>> Which contains one specific function used by iov.c.
>>
>> Without this, "make -C tests/tcg test_path" (and consequently
>> "make -C tests/tcg" or simply "make test") fails quite early.
>>
>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>> ---
>> tests/tcg/test_path.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c
>> index 1c29bce..74dbdaf 100644
>> --- a/tests/tcg/test_path.c
>> +++ b/tests/tcg/test_path.c
>> @@ -3,6 +3,7 @@
>> #include "util/cutils.c"
>> #include "util/hexdump.c"
>> #include "util/iov.c"
>> +#include "util/bufferiszero.c"
>
> This fixes the build, however why not take this opportunity to fix it
> through the Makefile instead of including .c?
>
Do you mean for all of the .c includes? I just took a baby step, which
seemed more consistent with the mission (get it to build), without
changing a lot.
> Regards,
>
> Phil.
>
Thanks for the review!
- Cleber.
>> #include "util/path.c"
>> #include "util/qemu-timer-common.c"
>> #include <stdarg.h>
>>
--
Cleber Rosa
[ Sr Software Engineer - Virtualization Team - Red Hat ]
[ Avocado Test Framework - avocado-framework.github.io ]
[ 7ABB 96EB 8B46 B94D 5E0F E9BB 657E 8D33 A5F2 09F3 ]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 1/6] tests/tcg/test_path.c: include utils/bufferiszero.c
2017-08-02 22:24 ` Cleber Rosa
@ 2017-08-17 13:26 ` Cleber Rosa
0 siblings, 0 replies; 12+ messages in thread
From: Cleber Rosa @ 2017-08-17 13:26 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]
On 08/02/2017 06:24 PM, Cleber Rosa wrote:
>
>
> On 08/02/2017 05:36 PM, Philippe Mathieu-Daudé wrote:
>> Hi Cleber,
>>
>> On 08/02/2017 05:15 PM, Cleber Rosa wrote:
>>> Which contains one specific function used by iov.c.
>>>
>>> Without this, "make -C tests/tcg test_path" (and consequently
>>> "make -C tests/tcg" or simply "make test") fails quite early.
>>>
>>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>>> ---
>>> tests/tcg/test_path.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c
>>> index 1c29bce..74dbdaf 100644
>>> --- a/tests/tcg/test_path.c
>>> +++ b/tests/tcg/test_path.c
>>> @@ -3,6 +3,7 @@
>>> #include "util/cutils.c"
>>> #include "util/hexdump.c"
>>> #include "util/iov.c"
>>> +#include "util/bufferiszero.c"
>>
>> This fixes the build, however why not take this opportunity to fix it
>> through the Makefile instead of including .c?
>>
>
> Do you mean for all of the .c includes? I just took a baby step, which
> seemed more consistent with the mission (get it to build), without
> changing a lot.
>
Hi Phil,
Can you clarify what you meant here?
Thanks!
--
Cleber Rosa
[ Sr Software Engineer - Virtualization Team - Red Hat ]
[ Avocado Test Framework - avocado-framework.github.io ]
[ 7ABB 96EB 8B46 B94D 5E0F E9BB 657E 8D33 A5F2 09F3 ]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 2/6] tests/tcg/linux-test.c: remove unused include of "qemu/cutils.h"
2017-08-02 20:15 [Qemu-devel] [PATCH 0/6] Enable building and running tcg tests on i386 Cleber Rosa
2017-08-02 20:15 ` [Qemu-devel] [PATCH 1/6] tests/tcg/test_path.c: include utils/bufferiszero.c Cleber Rosa
@ 2017-08-02 20:15 ` Cleber Rosa
2017-08-02 20:15 ` [Qemu-devel] [PATCH 3/6] tests/tcg/linux-test.c: include definitions for getrusage() Cleber Rosa
` (3 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Cleber Rosa @ 2017-08-02 20:15 UTC (permalink / raw)
To: qemu-devel; +Cc: Cleber Rosa
Building tests/tcg/linux-test is not currently possible because
$(QEMU_INCLUDES) is not being passed to $(CC_I386). But, since
it's not really used, instead of adding the $(QEMU_INCLUDES),
let's remove the "qemu/ctuils.h" include instead.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/tcg/linux-test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
index 5070d31..1c6c013 100644
--- a/tests/tcg/linux-test.c
+++ b/tests/tcg/linux-test.c
@@ -39,7 +39,6 @@
#include <dirent.h>
#include <setjmp.h>
#include <sys/shm.h>
-#include "qemu/cutils.h"
#define TESTPATH "/tmp/linux-test.tmp"
#define TESTPORT 7654
--
2.9.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 3/6] tests/tcg/linux-test.c: include definitions for getrusage()
2017-08-02 20:15 [Qemu-devel] [PATCH 0/6] Enable building and running tcg tests on i386 Cleber Rosa
2017-08-02 20:15 ` [Qemu-devel] [PATCH 1/6] tests/tcg/test_path.c: include utils/bufferiszero.c Cleber Rosa
2017-08-02 20:15 ` [Qemu-devel] [PATCH 2/6] tests/tcg/linux-test.c: remove unused include of "qemu/cutils.h" Cleber Rosa
@ 2017-08-02 20:15 ` Cleber Rosa
2017-08-02 21:28 ` Philippe Mathieu-Daudé
2017-08-02 20:15 ` [Qemu-devel] [PATCH 4/6] tests/tcg/test-i386-fprem: build with $(QEMU_CFLAGS) Cleber Rosa
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Cleber Rosa @ 2017-08-02 20:15 UTC (permalink / raw)
To: qemu-devel; +Cc: Cleber Rosa
A include for <sys/resources.h> is missing, and prevents
tests/tcg/linux-test from compiling.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/tcg/linux-test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
index 1c6c013..15c9d7f 100644
--- a/tests/tcg/linux-test.c
+++ b/tests/tcg/linux-test.c
@@ -39,6 +39,7 @@
#include <dirent.h>
#include <setjmp.h>
#include <sys/shm.h>
+#include <sys/resource.h>
#define TESTPATH "/tmp/linux-test.tmp"
#define TESTPORT 7654
--
2.9.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 3/6] tests/tcg/linux-test.c: include definitions for getrusage()
2017-08-02 20:15 ` [Qemu-devel] [PATCH 3/6] tests/tcg/linux-test.c: include definitions for getrusage() Cleber Rosa
@ 2017-08-02 21:28 ` Philippe Mathieu-Daudé
2017-08-02 21:37 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 12+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-08-02 21:28 UTC (permalink / raw)
To: Cleber Rosa, qemu-devel
Hi Cleber,
On 08/02/2017 05:15 PM, Cleber Rosa wrote:
> A include for <sys/resources.h> is missing, and prevents
> tests/tcg/linux-test from compiling.
getrusage() I presume, don't know if worth adding in commit message.
>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> tests/tcg/linux-test.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
> index 1c6c013..15c9d7f 100644
> --- a/tests/tcg/linux-test.c
> +++ b/tests/tcg/linux-test.c
> @@ -39,6 +39,7 @@
> #include <dirent.h>
> #include <setjmp.h>
> #include <sys/shm.h>
> +#include <sys/resource.h>
>
> #define TESTPATH "/tmp/linux-test.tmp"
> #define TESTPORT 7654
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH 3/6] tests/tcg/linux-test.c: include definitions for getrusage()
2017-08-02 21:28 ` Philippe Mathieu-Daudé
@ 2017-08-02 21:37 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 12+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-08-02 21:37 UTC (permalink / raw)
To: Cleber Rosa, qemu-devel@nongnu.org Developers
On Wed, Aug 2, 2017 at 6:28 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Hi Cleber,
>
> On 08/02/2017 05:15 PM, Cleber Rosa wrote:
>>
>> A include for <sys/resources.h> is missing, and prevents
>> tests/tcg/linux-test from compiling.
>
>
> getrusage() I presume, don't know if worth adding in commit message.
Sorry I missed it from the commit subject :/
>
>>
>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>
>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
>
>> ---
>> tests/tcg/linux-test.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
>> index 1c6c013..15c9d7f 100644
>> --- a/tests/tcg/linux-test.c
>> +++ b/tests/tcg/linux-test.c
>> @@ -39,6 +39,7 @@
>> #include <dirent.h>
>> #include <setjmp.h>
>> #include <sys/shm.h>
>> +#include <sys/resource.h>
>> #define TESTPATH "/tmp/linux-test.tmp"
>> #define TESTPORT 7654
>>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 4/6] tests/tcg/test-i386-fprem: build with $(QEMU_CFLAGS)
2017-08-02 20:15 [Qemu-devel] [PATCH 0/6] Enable building and running tcg tests on i386 Cleber Rosa
` (2 preceding siblings ...)
2017-08-02 20:15 ` [Qemu-devel] [PATCH 3/6] tests/tcg/linux-test.c: include definitions for getrusage() Cleber Rosa
@ 2017-08-02 20:15 ` Cleber Rosa
2017-08-02 20:15 ` [Qemu-devel] [PATCH 5/6] tests/tcg/test-i386-fprem.c: compilation fix for -Werror=strict-prototype Cleber Rosa
2017-08-02 20:15 ` [Qemu-devel] [PATCH 6/6] tests/tcg/test-i386-fprem.c: compilation fix for -Werror=unused-const-variable= Cleber Rosa
5 siblings, 0 replies; 12+ messages in thread
From: Cleber Rosa @ 2017-08-02 20:15 UTC (permalink / raw)
To: qemu-devel; +Cc: Cleber Rosa
So that glib.h can be found.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/tcg/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index 89e3342..c946fde 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -98,7 +98,7 @@ test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \
$(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
test-i386-fprem: test-i386-fprem.c
- $(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $^
+ $(CC_I386) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^
test-x86_64: test-i386.c \
test-i386.h test-i386-shift.h test-i386-muldiv.h
--
2.9.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 5/6] tests/tcg/test-i386-fprem.c: compilation fix for -Werror=strict-prototype
2017-08-02 20:15 [Qemu-devel] [PATCH 0/6] Enable building and running tcg tests on i386 Cleber Rosa
` (3 preceding siblings ...)
2017-08-02 20:15 ` [Qemu-devel] [PATCH 4/6] tests/tcg/test-i386-fprem: build with $(QEMU_CFLAGS) Cleber Rosa
@ 2017-08-02 20:15 ` Cleber Rosa
2017-08-02 20:15 ` [Qemu-devel] [PATCH 6/6] tests/tcg/test-i386-fprem.c: compilation fix for -Werror=unused-const-variable= Cleber Rosa
5 siblings, 0 replies; 12+ messages in thread
From: Cleber Rosa @ 2017-08-02 20:15 UTC (permalink / raw)
To: qemu-devel; +Cc: Cleber Rosa
A trivial fix to make the compiler happy.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/tcg/test-i386-fprem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/test-i386-fprem.c
index 1a71623..f70363d 100644
--- a/tests/tcg/test-i386-fprem.c
+++ b/tests/tcg/test-i386-fprem.c
@@ -98,7 +98,7 @@ static const union float80u smallest_positive_norm = {
.ieee.mantissa = 0,
};
-static void fninit()
+static void fninit(void)
{
asm volatile ("fninit\n");
}
--
2.9.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PATCH 6/6] tests/tcg/test-i386-fprem.c: compilation fix for -Werror=unused-const-variable=
2017-08-02 20:15 [Qemu-devel] [PATCH 0/6] Enable building and running tcg tests on i386 Cleber Rosa
` (4 preceding siblings ...)
2017-08-02 20:15 ` [Qemu-devel] [PATCH 5/6] tests/tcg/test-i386-fprem.c: compilation fix for -Werror=strict-prototype Cleber Rosa
@ 2017-08-02 20:15 ` Cleber Rosa
5 siblings, 0 replies; 12+ messages in thread
From: Cleber Rosa @ 2017-08-02 20:15 UTC (permalink / raw)
To: qemu-devel; +Cc: Cleber Rosa
A clean up of unused code to make the compiler happy.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/tcg/test-i386-fprem.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/test-i386-fprem.c
index f70363d..1dceda0 100644
--- a/tests/tcg/test-i386-fprem.c
+++ b/tests/tcg/test-i386-fprem.c
@@ -54,14 +54,6 @@ union float80u {
#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
-static const union float80u q_nan = {
- .ieee_nan.negative = 0, /* X */
- .ieee_nan.exponent = 0x7fff,
- .ieee_nan.one = 1,
- .ieee_nan.quiet_nan = 1,
- .ieee_nan.mantissa = 0,
-};
-
static const union float80u s_nan = {
.ieee_nan.negative = 0, /* X */
.ieee_nan.exponent = 0x7fff,
@@ -91,13 +83,6 @@ static const union float80u pos_denorm = {
.ieee.mantissa = 1,
};
-static const union float80u smallest_positive_norm = {
- .ieee.negative = 0,
- .ieee.exponent = 1,
- .ieee.one = 1,
- .ieee.mantissa = 0,
-};
-
static void fninit(void)
{
asm volatile ("fninit\n");
--
2.9.4
^ permalink raw reply related [flat|nested] 12+ messages in thread