Re: [Qemu-devel] [PATCH v3 0/6] Clean up TCG tests

2016-11-03 Thread Pranith Kumar
Hi Alex,

I have a merged branch with these changes but it needs more work. I
will post the next version soon(for some definition of soon :)

You can find the in-progress branch here:

https://github.com/pranith/qemu tcg_test_cleanup_v4


Thanks,

On Thu, Nov 3, 2016 at 9:35 AM, Alex Bennée  wrote:
>
> Marc-André Lureau  writes:
>
>> Hi
>>
>> On Mon, Sep 19, 2016 at 7:57 PM Pranith Kumar  wrote:
>>
>>>
>>> Hi Marc,
>>>
>>> Marc-André Lureau writes:
>>>
>>> > Hi Pranith
>>> >
>>> > On Sat, Sep 17, 2016 at 6:05 PM Pranith Kumar 
>>> wrote:
>>> >
>>> >> Hello,
>>> >>
>>> >> This patch series cleans up the tcg tests in tests/tcg folder.
>>> >>
>>> >>
>>> > Incidentally, I was also looking at reorganizing tests/tcg last week. I
>>> > think your series brings some necessary improvements, but it will
>>> probably
>>> > need more iterations before it is accepted. Could you split off your
>>> > obvious changes, such as test build fixes? I think it would help to get
>>> > those out of the way first (cc -trivial). Also it would help if you
>>> > documented the makefile changes.
>>>
>>>
>> fwiw, here is my wip at cleaning up tests/tcg:
>> https://github.com/elmarco/qemu/tree/tcg-tests/tests/tcg
>>
>> The build-sys there has a lot of benefits over what is in tests/tcg today:
>> - uses implicit rules, for building, for running qemu
>> - dependency tracking
>> - generate gitignore, clean rule
>> - detects cross-compiler and qemu, skip the test when unavailable
>>
>> I have quite a lot of trouble finding suitable cross-compilers for the
>> various archs. crosstool-ng helped me to build some of them, but it's not
>> obvious how to build the various archs, and when it builds, it often
>> fails/crash. Anyway, this can hopefully give some ideas/inspiration. I did
>> port i386/x64 and arm, and fixes a couple of qemu bugs on the way. (but arm
>> mmap test still crashes qemu for ex).
>>
>> OK, I will split up the patches into trivial fixes and document the changes
>>> to
>>> Makefiles.
>
> Where did we get to with these changes? Who's posting the next series?
>
> --
> Alex Bennée



-- 
Pranith



Re: [Qemu-devel] [PATCH v3 0/6] Clean up TCG tests

2016-11-03 Thread Alex Bennée

Marc-André Lureau  writes:

> Hi
>
> On Mon, Sep 19, 2016 at 7:57 PM Pranith Kumar  wrote:
>
>>
>> Hi Marc,
>>
>> Marc-André Lureau writes:
>>
>> > Hi Pranith
>> >
>> > On Sat, Sep 17, 2016 at 6:05 PM Pranith Kumar 
>> wrote:
>> >
>> >> Hello,
>> >>
>> >> This patch series cleans up the tcg tests in tests/tcg folder.
>> >>
>> >>
>> > Incidentally, I was also looking at reorganizing tests/tcg last week. I
>> > think your series brings some necessary improvements, but it will
>> probably
>> > need more iterations before it is accepted. Could you split off your
>> > obvious changes, such as test build fixes? I think it would help to get
>> > those out of the way first (cc -trivial). Also it would help if you
>> > documented the makefile changes.
>>
>>
> fwiw, here is my wip at cleaning up tests/tcg:
> https://github.com/elmarco/qemu/tree/tcg-tests/tests/tcg
>
> The build-sys there has a lot of benefits over what is in tests/tcg today:
> - uses implicit rules, for building, for running qemu
> - dependency tracking
> - generate gitignore, clean rule
> - detects cross-compiler and qemu, skip the test when unavailable
>
> I have quite a lot of trouble finding suitable cross-compilers for the
> various archs. crosstool-ng helped me to build some of them, but it's not
> obvious how to build the various archs, and when it builds, it often
> fails/crash. Anyway, this can hopefully give some ideas/inspiration. I did
> port i386/x64 and arm, and fixes a couple of qemu bugs on the way. (but arm
> mmap test still crashes qemu for ex).
>
> OK, I will split up the patches into trivial fixes and document the changes
>> to
>> Makefiles.

Where did we get to with these changes? Who's posting the next series?

--
Alex Bennée



Re: [Qemu-devel] [PATCH v3 0/6] Clean up TCG tests

2016-09-23 Thread Marc-André Lureau
Hi

On Mon, Sep 19, 2016 at 7:57 PM Pranith Kumar  wrote:

>
> Hi Marc,
>
> Marc-André Lureau writes:
>
> > Hi Pranith
> >
> > On Sat, Sep 17, 2016 at 6:05 PM Pranith Kumar 
> wrote:
> >
> >> Hello,
> >>
> >> This patch series cleans up the tcg tests in tests/tcg folder.
> >>
> >>
> > Incidentally, I was also looking at reorganizing tests/tcg last week. I
> > think your series brings some necessary improvements, but it will
> probably
> > need more iterations before it is accepted. Could you split off your
> > obvious changes, such as test build fixes? I think it would help to get
> > those out of the way first (cc -trivial). Also it would help if you
> > documented the makefile changes.
>
>
fwiw, here is my wip at cleaning up tests/tcg:
https://github.com/elmarco/qemu/tree/tcg-tests/tests/tcg

The build-sys there has a lot of benefits over what is in tests/tcg today:
- uses implicit rules, for building, for running qemu
- dependency tracking
- generate gitignore, clean rule
- detects cross-compiler and qemu, skip the test when unavailable

I have quite a lot of trouble finding suitable cross-compilers for the
various archs. crosstool-ng helped me to build some of them, but it's not
obvious how to build the various archs, and when it builds, it often
fails/crash. Anyway, this can hopefully give some ideas/inspiration. I did
port i386/x64 and arm, and fixes a couple of qemu bugs on the way. (but arm
mmap test still crashes qemu for ex).

OK, I will split up the patches into trivial fixes and document the changes
> to
> Makefiles.
> >
> >
> >> The tests have bit-rotten and were not compiling or running. I fixed
> >> the Makefiles to make them compile but there are tests which do not
> >> pass.
> >>
> >> The motivation is to add litmus tests to each arch and have them run
> >> using the 'make check' target to test consistency on TCG.
> >>
> >> There are no maintainers listed for this test folder. So I am cc'ing
> >> people who I think might be interested.
> >>
> >> As suggested by rth in v1 posting, I hooked up 'tests-tcg' target to
> >> run native tests. Detecting cross compilers or running the tests
> >> in docker containers are suggested ideas to make running the tests
> >> easier.
> >>
> >
> > It doesn't make much sense to me to run only native tests (the uname -p),
> > could you explain the rationale? Instead, I would check what
> > cross-compilers and qemu targets are available to run the appropriate
> tests.
> >
>
> Detecting cross compilers is not perfect right now, so I hooked up only the
> native tests. If you know of a reliable way to detect the presence of cross
> compilers, please let me know :)
>
> Cross compilation tests are supposed to be called by providing a CROSS_CC
> env
> variable populated with the installed cross compiler from the
> build/-linux-user/tests/ directory (as documented in the arm Makefile
> header).
>
> I did not touch the make files for most archs which already had the cross
> compiler hard-coded. I can modify them to make them similar to what I did
> for
> ARM.
>
> --
> Pranith
>
-- 
Marc-André Lureau


Re: [Qemu-devel] [PATCH v3 0/6] Clean up TCG tests

2016-09-19 Thread Pranith Kumar

Hi Marc,

Marc-André Lureau writes:

> Hi Pranith
>
> On Sat, Sep 17, 2016 at 6:05 PM Pranith Kumar  wrote:
>
>> Hello,
>>
>> This patch series cleans up the tcg tests in tests/tcg folder.
>>
>>
> Incidentally, I was also looking at reorganizing tests/tcg last week. I
> think your series brings some necessary improvements, but it will probably
> need more iterations before it is accepted. Could you split off your
> obvious changes, such as test build fixes? I think it would help to get
> those out of the way first (cc -trivial). Also it would help if you
> documented the makefile changes.

OK, I will split up the patches into trivial fixes and document the changes to
Makefiles.
>
>
>> The tests have bit-rotten and were not compiling or running. I fixed
>> the Makefiles to make them compile but there are tests which do not
>> pass.
>>
>> The motivation is to add litmus tests to each arch and have them run
>> using the 'make check' target to test consistency on TCG.
>>
>> There are no maintainers listed for this test folder. So I am cc'ing
>> people who I think might be interested.
>>
>> As suggested by rth in v1 posting, I hooked up 'tests-tcg' target to
>> run native tests. Detecting cross compilers or running the tests
>> in docker containers are suggested ideas to make running the tests
>> easier.
>>
>
> It doesn't make much sense to me to run only native tests (the uname -p),
> could you explain the rationale? Instead, I would check what
> cross-compilers and qemu targets are available to run the appropriate tests.
>

Detecting cross compilers is not perfect right now, so I hooked up only the
native tests. If you know of a reliable way to detect the presence of cross
compilers, please let me know :)

Cross compilation tests are supposed to be called by providing a CROSS_CC env
variable populated with the installed cross compiler from the
build/-linux-user/tests/ directory (as documented in the arm Makefile
header).

I did not touch the make files for most archs which already had the cross
compiler hard-coded. I can modify them to make them similar to what I did for
ARM.

-- 
Pranith



Re: [Qemu-devel] [PATCH v3 0/6] Clean up TCG tests

2016-09-19 Thread Marc-André Lureau
Hi Pranith

On Sat, Sep 17, 2016 at 6:05 PM Pranith Kumar  wrote:

> Hello,
>
> This patch series cleans up the tcg tests in tests/tcg folder.
>
>
Incidentally, I was also looking at reorganizing tests/tcg last week. I
think your series brings some necessary improvements, but it will probably
need more iterations before it is accepted. Could you split off your
obvious changes, such as test build fixes? I think it would help to get
those out of the way first (cc -trivial). Also it would help if you
documented the makefile changes.


> The tests have bit-rotten and were not compiling or running. I fixed
> the Makefiles to make them compile but there are tests which do not
> pass.
>
> The motivation is to add litmus tests to each arch and have them run
> using the 'make check' target to test consistency on TCG.
>
> There are no maintainers listed for this test folder. So I am cc'ing
> people who I think might be interested.
>
> As suggested by rth in v1 posting, I hooked up 'tests-tcg' target to
> run native tests. Detecting cross compilers or running the tests
> in docker containers are suggested ideas to make running the tests
> easier.
>

It doesn't make much sense to me to run only native tests (the uname -p),
could you explain the rationale? Instead, I would check what
cross-compilers and qemu targets are available to run the appropriate tests.


>
> v3:
>   - Update with review feedback from Alex Bennée.
>
> v2:
>   - Add tests-tcg target to invoke native tests.
>
> Pranith Kumar (6):
>   tests/tcg: Move i386 tests to arch specific folder
>   tests/tcg: Move arm tests to arch specific folder
>   tests/tcg: Move mips test to arch specific folder
>   tests/tcg: Create and populate misc tests for arch independent tests
>   tests/tcg: Add and update Makefiles
>   tests/tcg: Add tests-tcg hook in Makefile
>
>  tests/Makefile.include  |   1 +
>  tests/tcg/Makefile  | 156
> 
>  tests/tcg/Makefile.include  |  34 +++
>  tests/tcg/alpha/Makefile|  38 +---
>  tests/tcg/arm/Makefile  |  51 +++
>  tests/tcg/{ => arm}/hello-arm.c |   0
>  tests/tcg/{ => arm}/test-arm-iwmmxt.s   |   0
>  tests/tcg/cris/Makefile |  17 +++-
>  tests/tcg/i386/Makefile |  87 ++
>  tests/tcg/{ => i386}/hello-i386.c   |   9 +-
>  tests/tcg/{ => i386}/pi_10.com  | Bin
>  tests/tcg/{ => i386}/runcom.c   |   0
>  tests/tcg/{ => i386}/test-i386-code16.S |   0
>  tests/tcg/{ => i386}/test-i386-fprem.c  |   0
>  tests/tcg/{ => i386}/test-i386-muldiv.h |   0
>  tests/tcg/{ => i386}/test-i386-shift.h  |   0
>  tests/tcg/{ => i386}/test-i386-ssse3.c  |   0
>  tests/tcg/{ => i386}/test-i386-vm86.S   |   0
>  tests/tcg/{ => i386}/test-i386.c|   0
>  tests/tcg/{ => i386}/test-i386.h|   0
>  tests/tcg/lm32/Makefile |  17 +++-
>  tests/tcg/mips/Makefile |  46 ++
>  tests/tcg/{ => mips}/hello-mips.c   |   0
>  tests/tcg/mips/mips32-dsp/Makefile  |  17 +++-
>  tests/tcg/mips/mips32-dspr2/Makefile|  17 +++-
>  tests/tcg/mips/mips64-dsp/Makefile  |  18 +++-
>  tests/tcg/mips/mips64-dspr2/Makefile|  17 +++-
>  tests/tcg/misc/Makefile |  81 +
>  tests/tcg/{ => misc}/linux-test.c   |   3 +
>  tests/tcg/{ => misc}/sha1.c |   0
>  tests/tcg/{ => misc}/test-mmap.c|   0
>  tests/tcg/{ => misc}/test_path.c|   0
>  tests/tcg/{ => misc}/testthread.c   |   0
>  tests/tcg/openrisc/Makefile |  19 +++-
>  tests/tcg/xtensa/Makefile   |  17 +++-
>  35 files changed, 457 insertions(+), 188 deletions(-)
>  delete mode 100644 tests/tcg/Makefile
>  create mode 100644 tests/tcg/Makefile.include
>  create mode 100644 tests/tcg/arm/Makefile
>  rename tests/tcg/{ => arm}/hello-arm.c (100%)
>  rename tests/tcg/{ => arm}/test-arm-iwmmxt.s (100%)
>  create mode 100644 tests/tcg/i386/Makefile
>  rename tests/tcg/{ => i386}/hello-i386.c (71%)
>  rename tests/tcg/{ => i386}/pi_10.com (100%)
>  rename tests/tcg/{ => i386}/runcom.c (100%)
>  rename tests/tcg/{ => i386}/test-i386-code16.S (100%)
>  rename tests/tcg/{ => i386}/test-i386-fprem.c (100%)
>  rename tests/tcg/{ => i386}/test-i386-muldiv.h (100%)
>  rename tests/tcg/{ => i386}/test-i386-shift.h (100%)
>  rename tests/tcg/{ => i386}/test-i386-ssse3.c (100%)
>  rename tests/tcg/{ => i386}/test-i386-vm86.S (100%)
>  rename tests/tcg/{ => i386}/test-i386.c (100%)
>  rename tests/tcg/{ => i386}/test-i386.h (100%)
>  create mode 100644 tests/tcg/mips/Makefile
>  rename tests/tcg/{ => mips}/hello-mips.c (100%)
>  create mode 100644 tests/tcg/misc/Makefile
>  rename tests/tcg/{ => misc}/linux-test.c (99%)
>  rename tests/tcg/{ => misc}/sha1.c (100%)
>  rename tests/tcg/{ => misc}/test-mmap.c (100%)
>  rename tests/tcg/{ => misc}/test_path.c (100%)
>  rename tests/tcg/{ => m

[Qemu-devel] [PATCH v3 0/6] Clean up TCG tests

2016-09-17 Thread Pranith Kumar
Hello,

This patch series cleans up the tcg tests in tests/tcg folder.

The tests have bit-rotten and were not compiling or running. I fixed
the Makefiles to make them compile but there are tests which do not
pass.

The motivation is to add litmus tests to each arch and have them run
using the 'make check' target to test consistency on TCG.

There are no maintainers listed for this test folder. So I am cc'ing
people who I think might be interested.

As suggested by rth in v1 posting, I hooked up 'tests-tcg' target to
run native tests. Detecting cross compilers or running the tests
in docker containers are suggested ideas to make running the tests
easier.

v3:
  - Update with review feedback from Alex Bennée.

v2:
  - Add tests-tcg target to invoke native tests.

Pranith Kumar (6):
  tests/tcg: Move i386 tests to arch specific folder
  tests/tcg: Move arm tests to arch specific folder
  tests/tcg: Move mips test to arch specific folder
  tests/tcg: Create and populate misc tests for arch independent tests
  tests/tcg: Add and update Makefiles
  tests/tcg: Add tests-tcg hook in Makefile

 tests/Makefile.include  |   1 +
 tests/tcg/Makefile  | 156 
 tests/tcg/Makefile.include  |  34 +++
 tests/tcg/alpha/Makefile|  38 +---
 tests/tcg/arm/Makefile  |  51 +++
 tests/tcg/{ => arm}/hello-arm.c |   0
 tests/tcg/{ => arm}/test-arm-iwmmxt.s   |   0
 tests/tcg/cris/Makefile |  17 +++-
 tests/tcg/i386/Makefile |  87 ++
 tests/tcg/{ => i386}/hello-i386.c   |   9 +-
 tests/tcg/{ => i386}/pi_10.com  | Bin
 tests/tcg/{ => i386}/runcom.c   |   0
 tests/tcg/{ => i386}/test-i386-code16.S |   0
 tests/tcg/{ => i386}/test-i386-fprem.c  |   0
 tests/tcg/{ => i386}/test-i386-muldiv.h |   0
 tests/tcg/{ => i386}/test-i386-shift.h  |   0
 tests/tcg/{ => i386}/test-i386-ssse3.c  |   0
 tests/tcg/{ => i386}/test-i386-vm86.S   |   0
 tests/tcg/{ => i386}/test-i386.c|   0
 tests/tcg/{ => i386}/test-i386.h|   0
 tests/tcg/lm32/Makefile |  17 +++-
 tests/tcg/mips/Makefile |  46 ++
 tests/tcg/{ => mips}/hello-mips.c   |   0
 tests/tcg/mips/mips32-dsp/Makefile  |  17 +++-
 tests/tcg/mips/mips32-dspr2/Makefile|  17 +++-
 tests/tcg/mips/mips64-dsp/Makefile  |  18 +++-
 tests/tcg/mips/mips64-dspr2/Makefile|  17 +++-
 tests/tcg/misc/Makefile |  81 +
 tests/tcg/{ => misc}/linux-test.c   |   3 +
 tests/tcg/{ => misc}/sha1.c |   0
 tests/tcg/{ => misc}/test-mmap.c|   0
 tests/tcg/{ => misc}/test_path.c|   0
 tests/tcg/{ => misc}/testthread.c   |   0
 tests/tcg/openrisc/Makefile |  19 +++-
 tests/tcg/xtensa/Makefile   |  17 +++-
 35 files changed, 457 insertions(+), 188 deletions(-)
 delete mode 100644 tests/tcg/Makefile
 create mode 100644 tests/tcg/Makefile.include
 create mode 100644 tests/tcg/arm/Makefile
 rename tests/tcg/{ => arm}/hello-arm.c (100%)
 rename tests/tcg/{ => arm}/test-arm-iwmmxt.s (100%)
 create mode 100644 tests/tcg/i386/Makefile
 rename tests/tcg/{ => i386}/hello-i386.c (71%)
 rename tests/tcg/{ => i386}/pi_10.com (100%)
 rename tests/tcg/{ => i386}/runcom.c (100%)
 rename tests/tcg/{ => i386}/test-i386-code16.S (100%)
 rename tests/tcg/{ => i386}/test-i386-fprem.c (100%)
 rename tests/tcg/{ => i386}/test-i386-muldiv.h (100%)
 rename tests/tcg/{ => i386}/test-i386-shift.h (100%)
 rename tests/tcg/{ => i386}/test-i386-ssse3.c (100%)
 rename tests/tcg/{ => i386}/test-i386-vm86.S (100%)
 rename tests/tcg/{ => i386}/test-i386.c (100%)
 rename tests/tcg/{ => i386}/test-i386.h (100%)
 create mode 100644 tests/tcg/mips/Makefile
 rename tests/tcg/{ => mips}/hello-mips.c (100%)
 create mode 100644 tests/tcg/misc/Makefile
 rename tests/tcg/{ => misc}/linux-test.c (99%)
 rename tests/tcg/{ => misc}/sha1.c (100%)
 rename tests/tcg/{ => misc}/test-mmap.c (100%)
 rename tests/tcg/{ => misc}/test_path.c (100%)
 rename tests/tcg/{ => misc}/testthread.c (100%)

-- 
2.9.3