* [Qemu-devel] Make test
[not found] <mailman.3749.1503600836.21955.qemu-devel@nongnu.org>
@ 2017-08-24 19:10 ` Programmingkid
2017-08-24 20:41 ` Cleber Rosa
0 siblings, 1 reply; 11+ messages in thread
From: Programmingkid @ 2017-08-24 19:10 UTC (permalink / raw)
To: qemu-devel
I think 'make test' is an abandoned testing option for QEMU so this report might be unimportant. Here is my results for running 'make test':
$ make test
make -C tests/tcg test
LINK test_path
Undefined symbols for architecture x86_64:
"_buffer_is_zero", referenced from:
_qemu_iovec_is_zero in test_path.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [test_path] Error 1
make: *** [test] Error 2
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Make test
2017-08-24 19:10 ` [Qemu-devel] Make test Programmingkid
@ 2017-08-24 20:41 ` Cleber Rosa
2017-08-24 21:50 ` Programmingkid
2017-08-24 22:18 ` Programmingkid
0 siblings, 2 replies; 11+ messages in thread
From: Cleber Rosa @ 2017-08-24 20:41 UTC (permalink / raw)
To: Programmingkid, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]
On 08/24/2017 03:10 PM, Programmingkid wrote:
> I think 'make test' is an abandoned testing option for QEMU so this report might be unimportant. Here is my results for running 'make test':
>
> $ make test
> make -C tests/tcg test
> LINK test_path
> Undefined symbols for architecture x86_64:
> "_buffer_is_zero", referenced from:
> _qemu_iovec_is_zero in test_path.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make[1]: *** [test_path] Error 1
> make: *** [test] Error 2
>
>
I went through the same experience, and reported it (in the form of
patches) here:
http://lists.nongnu.org/archive/html/qemu-devel/2017-08/msg00378.html
Although it looks like you're clang, so it'd be nice to check if these
fixes work for you too.
Regards,
--
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] 11+ messages in thread
* Re: [Qemu-devel] Make test
2017-08-24 20:41 ` Cleber Rosa
@ 2017-08-24 21:50 ` Programmingkid
2017-08-24 22:16 ` Cleber Rosa
2017-08-24 22:18 ` Programmingkid
1 sibling, 1 reply; 11+ messages in thread
From: Programmingkid @ 2017-08-24 21:50 UTC (permalink / raw)
To: Cleber Rosa; +Cc: qemu-devel
> On Aug 24, 2017, at 4:41 PM, Cleber Rosa <crosa@redhat.com> wrote:
>
>
>
> On 08/24/2017 03:10 PM, Programmingkid wrote:
>> I think 'make test' is an abandoned testing option for QEMU so this report might be unimportant. Here is my results for running 'make test':
>>
>> $ make test
>> make -C tests/tcg test
>> LINK test_path
>> Undefined symbols for architecture x86_64:
>> "_buffer_is_zero", referenced from:
>> _qemu_iovec_is_zero in test_path.o
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> make[1]: *** [test_path] Error 1
>> make: *** [test] Error 2
>>
>>
>
> I went through the same experience, and reported it (in the form of
> patches) here:
>
> http://lists.nongnu.org/archive/html/qemu-devel/2017-08/msg00378.html
>
> Although it looks like you're clang, so it'd be nice to check if these
> fixes work for you too.
>
> Regards,
>
> --
> 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 ]
>
Thank you for the patches. I will test them. I was wondering what is the point to having both 'make check' and 'make test'. It looks like everyone is using 'make check'. Maybe we are better off removing the 'make test' target.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Make test
2017-08-24 21:50 ` Programmingkid
@ 2017-08-24 22:16 ` Cleber Rosa
2017-08-25 5:49 ` Thomas Huth
0 siblings, 1 reply; 11+ messages in thread
From: Cleber Rosa @ 2017-08-24 22:16 UTC (permalink / raw)
To: Programmingkid; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 721 bytes --]
On 08/24/2017 05:50 PM, Programmingkid wrote:
>
> Thank you for the patches. I will test them. I was wondering what is the point to having both 'make check' and 'make test'. It looks like everyone is using 'make check'. Maybe we are better off removing the 'make test' target.
>
I think the removing the `make test` target is a good thing, if its
tests are either absorbed by an existing `make check*` one. Now that
depends on what people think the tcg tests (and others) deserve... TLC?
Total annihilation?
--
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] 11+ messages in thread
* Re: [Qemu-devel] Make test
2017-08-24 20:41 ` Cleber Rosa
2017-08-24 21:50 ` Programmingkid
@ 2017-08-24 22:18 ` Programmingkid
2017-08-24 22:21 ` Cleber Rosa
1 sibling, 1 reply; 11+ messages in thread
From: Programmingkid @ 2017-08-24 22:18 UTC (permalink / raw)
To: Cleber Rosa; +Cc: qemu-devel
> On Aug 24, 2017, at 4:41 PM, Cleber Rosa <crosa@redhat.com> wrote:
>
>
>
> On 08/24/2017 03:10 PM, Programmingkid wrote:
>> I think 'make test' is an abandoned testing option for QEMU so this report might be unimportant. Here is my results for running 'make test':
>>
>> $ make test
>> make -C tests/tcg test
>> LINK test_path
>> Undefined symbols for architecture x86_64:
>> "_buffer_is_zero", referenced from:
>> _qemu_iovec_is_zero in test_path.o
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> make[1]: *** [test_path] Error 1
>> make: *** [test] Error 2
>>
>>
>
> I went through the same experience, and reported it (in the form of
> patches) here:
>
> http://lists.nongnu.org/archive/html/qemu-devel/2017-08/msg00378.html
>
> Although it looks like you're clang, so it'd be nice to check if these
> fixes work for you too.
>
> Regards,
>
> --
> 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 ]
>
After applying the patches I saw this error:
$ make test
make -C tests/tcg test
CC test_path.o
LINK test_path
./test_path
cc -m32 -nostdlib -Wall -O2 -g -fno-strict-aliasing -static -o hello-i386 hello-i386.c
hello-i386.c:1:10: fatal error: 'asm/unistd.h' file not found
#include <asm/unistd.h>
^
1 error generated.
make[1]: *** [hello-i386] Error 1
make: *** [test] Error 2
The path to this header file is /usr/include/unistd.h and /usr/include/sys/unistd.h on my computer. Maybe you could add this to your patches to make them more Mac-friendly:
#ifdef __MACH__ /* Mach kernel - what's used in Mac OS X */
#include <unistd.h>
#endif
http://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html
Then again this page states you should be able to do a "#include <unistd.h>" on your posix compatible platform.
Thank you.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Make test
2017-08-24 22:18 ` Programmingkid
@ 2017-08-24 22:21 ` Cleber Rosa
2017-08-24 22:24 ` Programmingkid
0 siblings, 1 reply; 11+ messages in thread
From: Cleber Rosa @ 2017-08-24 22:21 UTC (permalink / raw)
To: Programmingkid; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]
On 08/24/2017 06:18 PM, Programmingkid wrote:
> After applying the patches I saw this error:
>
> $ make test
> make -C tests/tcg test
> CC test_path.o
> LINK test_path
> ./test_path
> cc -m32 -nostdlib -Wall -O2 -g -fno-strict-aliasing -static -o hello-i386 hello-i386.c
> hello-i386.c:1:10: fatal error: 'asm/unistd.h' file not found
> #include <asm/unistd.h>
> ^
> 1 error generated.
> make[1]: *** [hello-i386] Error 1
> make: *** [test] Error 2
>
Thanks for testing it.
>
> The path to this header file is /usr/include/unistd.h and /usr/include/sys/unistd.h on my computer. Maybe you could add this to your patches to make them more Mac-friendly:
>
> #ifdef __MACH__ /* Mach kernel - what's used in Mac OS X */
> #include <unistd.h>
> #endif
>
> http://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html
> Then again this page states you should be able to do a "#include <unistd.h>" on your posix compatible platform.
>
> Thank you.
>
I'll take a look and attempt a more portable fix on a v2.
Regards!
--
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] 11+ messages in thread
* Re: [Qemu-devel] Make test
2017-08-24 22:21 ` Cleber Rosa
@ 2017-08-24 22:24 ` Programmingkid
0 siblings, 0 replies; 11+ messages in thread
From: Programmingkid @ 2017-08-24 22:24 UTC (permalink / raw)
To: Cleber Rosa; +Cc: qemu-devel
> On Aug 24, 2017, at 6:21 PM, Cleber Rosa <crosa@redhat.com> wrote:
>
>
>
> On 08/24/2017 06:18 PM, Programmingkid wrote:
>> After applying the patches I saw this error:
>>
>> $ make test
>> make -C tests/tcg test
>> CC test_path.o
>> LINK test_path
>> ./test_path
>> cc -m32 -nostdlib -Wall -O2 -g -fno-strict-aliasing -static -o hello-i386 hello-i386.c
>> hello-i386.c:1:10: fatal error: 'asm/unistd.h' file not found
>> #include <asm/unistd.h>
>> ^
>> 1 error generated.
>> make[1]: *** [hello-i386] Error 1
>> make: *** [test] Error 2
>>
>
> Thanks for testing it.
>
>>
>> The path to this header file is /usr/include/unistd.h and /usr/include/sys/unistd.h on my computer. Maybe you could add this to your patches to make them more Mac-friendly:
>>
>> #ifdef __MACH__ /* Mach kernel - what's used in Mac OS X */
>> #include <unistd.h>
>> #endif
>>
>> http://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html
>> Then again this page states you should be able to do a "#include <unistd.h>" on your posix compatible platform.
>>
>> Thank you.
>>
>
> I'll take a look and attempt a more portable fix on a v2.
>
> Regards!
>
> --
> 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 ]
Forgot to mention that doing a "#include <unistd.h>" does work on Mac OS X. Does this work on your platform?
#include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
printf("version = %ld\n", _POSIX_VERSION);
return 0;
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Make test
2017-08-24 22:16 ` Cleber Rosa
@ 2017-08-25 5:49 ` Thomas Huth
2017-08-25 9:10 ` Peter Maydell
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Huth @ 2017-08-25 5:49 UTC (permalink / raw)
To: Cleber Rosa, Programmingkid
Cc: qemu-devel, Richard Henderson, Paolo Bonzini, Peter Maydell
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
On 25.08.2017 00:16, Cleber Rosa wrote:
>
> On 08/24/2017 05:50 PM, Programmingkid wrote:
>>
>> Thank you for the patches. I will test them. I was wondering what is the point to having both 'make check' and 'make test'. It looks like everyone is using 'make check'. Maybe we are better off removing the 'make test' target.
>>
>
> I think the removing the `make test` target is a good thing, if its
> tests are either absorbed by an existing `make check*` one. Now that
> depends on what people think the tcg tests (and others) deserve... TLC?
> Total annihilation?
Since we do not have very good test coverage for TCG yet, I'd like to
see this rather fixed than removed! Could you please CC: me on future
versions of your patch series (I missed v1)?
And I'd suggest to rename "make test" to "make check-tcg" to align it
with the other check* targets. (I remember the very first time I was
trying to run the QEMU tests and this "check" vs. "test" naming caused
really some confusion for me).
Thomas
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Make test
2017-08-25 5:49 ` Thomas Huth
@ 2017-08-25 9:10 ` Peter Maydell
2017-08-25 9:33 ` Fam Zheng
0 siblings, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2017-08-25 9:10 UTC (permalink / raw)
To: Thomas Huth
Cc: Cleber Rosa, Programmingkid, QEMU Developers, Richard Henderson,
Paolo Bonzini
On 25 August 2017 at 06:49, Thomas Huth <thuth@redhat.com> wrote:
> On 25.08.2017 00:16, Cleber Rosa wrote:
>>
>> On 08/24/2017 05:50 PM, Programmingkid wrote:
>>>
>>> Thank you for the patches. I will test them. I was wondering what is the point to having both 'make check' and 'make test'. It looks like everyone is using 'make check'. Maybe we are better off removing the 'make test' target.
>>>
>>
>> I think the removing the `make test` target is a good thing, if its
>> tests are either absorbed by an existing `make check*` one. Now that
>> depends on what people think the tcg tests (and others) deserve... TLC?
>> Total annihilation?
>
> Since we do not have very good test coverage for TCG yet, I'd like to
> see this rather fixed than removed! Could you please CC: me on future
> versions of your patch series (I missed v1)?
The problem is that we don't have a good framework for building
guest binaries to run under TCG. We should sort out one of those
so that it's easy for a new test to say "this is the .c file,
build it with an ARM gcc [eg using our docker stuff], then
run it with this QEMU command". When we have that it should
be straightforward to convert the 'make test' tests to use
that, and they can be run under 'make check'.
thanks
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Make test
2017-08-25 9:10 ` Peter Maydell
@ 2017-08-25 9:33 ` Fam Zheng
2017-08-25 9:41 ` Peter Maydell
0 siblings, 1 reply; 11+ messages in thread
From: Fam Zheng @ 2017-08-25 9:33 UTC (permalink / raw)
To: Peter Maydell
Cc: Thomas Huth, Programmingkid, Richard Henderson, QEMU Developers,
Paolo Bonzini, Cleber Rosa
On Fri, 08/25 10:10, Peter Maydell wrote:
> On 25 August 2017 at 06:49, Thomas Huth <thuth@redhat.com> wrote:
> > On 25.08.2017 00:16, Cleber Rosa wrote:
> >>
> >> On 08/24/2017 05:50 PM, Programmingkid wrote:
> >>>
> >>> Thank you for the patches. I will test them. I was wondering what is the point to having both 'make check' and 'make test'. It looks like everyone is using 'make check'. Maybe we are better off removing the 'make test' target.
> >>>
> >>
> >> I think the removing the `make test` target is a good thing, if its
> >> tests are either absorbed by an existing `make check*` one. Now that
> >> depends on what people think the tcg tests (and others) deserve... TLC?
> >> Total annihilation?
> >
> > Since we do not have very good test coverage for TCG yet, I'd like to
> > see this rather fixed than removed! Could you please CC: me on future
> > versions of your patch series (I missed v1)?
>
> The problem is that we don't have a good framework for building
> guest binaries to run under TCG. We should sort out one of those
> so that it's easy for a new test to say "this is the .c file,
> build it with an ARM gcc [eg using our docker stuff], then
> run it with this QEMU command". When we have that it should
> be straightforward to convert the 'make test' tests to use
> that, and they can be run under 'make check'.
This seems straigtforward to do with docker. Could you elaborate a concrete
example of one of the "this is the .c file, ..." test so I can try translate it
to a Makefile rule using our docker images?
fam
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Make test
2017-08-25 9:33 ` Fam Zheng
@ 2017-08-25 9:41 ` Peter Maydell
0 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2017-08-25 9:41 UTC (permalink / raw)
To: Fam Zheng
Cc: Thomas Huth, Programmingkid, Richard Henderson, QEMU Developers,
Paolo Bonzini, Cleber Rosa
On 25 August 2017 at 10:33, Fam Zheng <famz@redhat.com> wrote:
> On Fri, 08/25 10:10, Peter Maydell wrote:
>> The problem is that we don't have a good framework for building
>> guest binaries to run under TCG. We should sort out one of those
>> so that it's easy for a new test to say "this is the .c file,
>> build it with an ARM gcc [eg using our docker stuff], then
>> run it with this QEMU command". When we have that it should
>> be straightforward to convert the 'make test' tests to use
>> that, and they can be run under 'make check'.
>
> This seems straigtforward to do with docker. Could you elaborate a concrete
> example of one of the "this is the .c file, ..." test so I can try translate it
> to a Makefile rule using our docker images?
tests/tcg/hello-i386.c is probably a good place to start.
It wants to be built with an i386 compiler like so:
i386-linux-gcc -nostdlib -Wall -O2 -g -fno-strict-aliasing -static -o
hello-i386 hello-i386.c
and then run with
qemu-i386 ./hello-i386
which should print "Hello World".
There's also a hello-arm which you can build with
arm-linux-gnueabihf-gcc -Wall -g -O2 -marm -c -o hello-arm.o hello-arm.c
arm-linux-gnueabihf-ld -o hello-arm hello-arm.o
and run with
qemu-arm ./hello-arm
to print "Hello World". (You can probably compile and link in one
step, but for some reason tests/tcg/Makefile is doing it with
two steps.)
thanks
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-08-25 9:42 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.3749.1503600836.21955.qemu-devel@nongnu.org>
2017-08-24 19:10 ` [Qemu-devel] Make test Programmingkid
2017-08-24 20:41 ` Cleber Rosa
2017-08-24 21:50 ` Programmingkid
2017-08-24 22:16 ` Cleber Rosa
2017-08-25 5:49 ` Thomas Huth
2017-08-25 9:10 ` Peter Maydell
2017-08-25 9:33 ` Fam Zheng
2017-08-25 9:41 ` Peter Maydell
2017-08-24 22:18 ` Programmingkid
2017-08-24 22:21 ` Cleber Rosa
2017-08-24 22:24 ` Programmingkid
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).