[PATCH for 7.0 0/5] bsd-user-smoke: A simple smoke test for bsd-user

Warner Losh posted 5 patches 2 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211127201846.64187-1-imp@bsdimp.com
tests/bsd-user-smoke/h.amd64.S      | 28 +++++++++++++++++++++
tests/bsd-user-smoke/h.armv7.S      | 37 +++++++++++++++++++++++++++
tests/bsd-user-smoke/h.i386.S       | 39 +++++++++++++++++++++++++++++
tests/bsd-user-smoke/meson.build    | 31 +++++++++++++++++++++++
tests/bsd-user-smoke/smoke-bsd-user | 22 ++++++++++++++++
tests/meson.build                   |  1 +
6 files changed, 158 insertions(+)
create mode 100644 tests/bsd-user-smoke/h.amd64.S
create mode 100644 tests/bsd-user-smoke/h.armv7.S
create mode 100644 tests/bsd-user-smoke/h.i386.S
create mode 100644 tests/bsd-user-smoke/meson.build
create mode 100644 tests/bsd-user-smoke/smoke-bsd-user
[PATCH for 7.0 0/5] bsd-user-smoke: A simple smoke test for bsd-user
Posted by Warner Losh 2 years, 5 months ago
This series adds a number of simple binaries that FreeBSD's clang can build on
any system. I've kept it simple so that there's no extra binaries that need to
be installed. Given the current state of bsd-user in the project's repo, this
likely is as extensive a set of tests that should be done right now. We can load
static binaries only (so these are static binaries) and hello world is the
canonical test. I have binaries for all the supported FreeBSD targets, but have
included only the ones that are in upstream (or in review) at this time.

In the future, I'll integreate with the tcg tests when there's more in upstream
they can test.  Since that requires putting together FreeBSD sysroots for all
the supported architectures for multiple versions, I'm going to delay that for a
while. I'll also integrate FreeBSD's 5k system tests when we're much further
along with the upstreaming.

The purpose of this is to give others doing changes in this area a standardized
way to ensure their changes don't fundamentally break bsd-user. This approach
will work for all setups that do a 'make check' to do their testing.

Based-on: 20211108035136.43687-1-imp@bsdimp.com

Warner Losh (5):
  h.armv7: Simple hello-world test for armv7
  h.i386: Simple hello-world test for i386
  h.amd64: Simple hello-world test for x86_64
  smoke-bsd-user: A test script to run all the FreeBSD binaries
  bsd-user-smoke: Add to build

 tests/bsd-user-smoke/h.amd64.S      | 28 +++++++++++++++++++++
 tests/bsd-user-smoke/h.armv7.S      | 37 +++++++++++++++++++++++++++
 tests/bsd-user-smoke/h.i386.S       | 39 +++++++++++++++++++++++++++++
 tests/bsd-user-smoke/meson.build    | 31 +++++++++++++++++++++++
 tests/bsd-user-smoke/smoke-bsd-user | 22 ++++++++++++++++
 tests/meson.build                   |  1 +
 6 files changed, 158 insertions(+)
 create mode 100644 tests/bsd-user-smoke/h.amd64.S
 create mode 100644 tests/bsd-user-smoke/h.armv7.S
 create mode 100644 tests/bsd-user-smoke/h.i386.S
 create mode 100644 tests/bsd-user-smoke/meson.build
 create mode 100644 tests/bsd-user-smoke/smoke-bsd-user

-- 
2.33.0


Re: [PATCH for 7.0 0/5] bsd-user-smoke: A simple smoke test for bsd-user
Posted by Warner Losh 2 years, 4 months ago
PING!

If anybody (especially the BSD reviewers) could look at these, that would
be great!

It's been suggested I rename bsd-user-smoke to just be bsd-user and we put
our tests there until we can switch to the more generic tcg tests, so I'll
do that and resend in a few days.

Warner

On Sat, Nov 27, 2021 at 1:19 PM Warner Losh <imp@bsdimp.com> wrote:

> This series adds a number of simple binaries that FreeBSD's clang can
> build on
> any system. I've kept it simple so that there's no extra binaries that
> need to
> be installed. Given the current state of bsd-user in the project's repo,
> this
> likely is as extensive a set of tests that should be done right now. We
> can load
> static binaries only (so these are static binaries) and hello world is the
> canonical test. I have binaries for all the supported FreeBSD targets, but
> have
> included only the ones that are in upstream (or in review) at this time.
>
> In the future, I'll integreate with the tcg tests when there's more in
> upstream
> they can test.  Since that requires putting together FreeBSD sysroots for
> all
> the supported architectures for multiple versions, I'm going to delay that
> for a
> while. I'll also integrate FreeBSD's 5k system tests when we're much
> further
> along with the upstreaming.
>
> The purpose of this is to give others doing changes in this area a
> standardized
> way to ensure their changes don't fundamentally break bsd-user. This
> approach
> will work for all setups that do a 'make check' to do their testing.
>
> Based-on: 20211108035136.43687-1-imp@bsdimp.com
>
> Warner Losh (5):
>   h.armv7: Simple hello-world test for armv7
>   h.i386: Simple hello-world test for i386
>   h.amd64: Simple hello-world test for x86_64
>   smoke-bsd-user: A test script to run all the FreeBSD binaries
>   bsd-user-smoke: Add to build
>
>  tests/bsd-user-smoke/h.amd64.S      | 28 +++++++++++++++++++++
>  tests/bsd-user-smoke/h.armv7.S      | 37 +++++++++++++++++++++++++++
>  tests/bsd-user-smoke/h.i386.S       | 39 +++++++++++++++++++++++++++++
>  tests/bsd-user-smoke/meson.build    | 31 +++++++++++++++++++++++
>  tests/bsd-user-smoke/smoke-bsd-user | 22 ++++++++++++++++
>  tests/meson.build                   |  1 +
>  6 files changed, 158 insertions(+)
>  create mode 100644 tests/bsd-user-smoke/h.amd64.S
>  create mode 100644 tests/bsd-user-smoke/h.armv7.S
>  create mode 100644 tests/bsd-user-smoke/h.i386.S
>  create mode 100644 tests/bsd-user-smoke/meson.build
>  create mode 100644 tests/bsd-user-smoke/smoke-bsd-user
>
> --
> 2.33.0
>
>
Re: [PATCH for 7.0 0/5] bsd-user-smoke: A simple smoke test for bsd-user
Posted by Alex Bennée 2 years, 3 months ago
Warner Losh <imp@bsdimp.com> writes:

> PING!
>
> If anybody (especially the BSD reviewers) could look at these, that would be great!
>
> It's been suggested I rename bsd-user-smoke to just be bsd-user and we put our tests there until we can switch to the more generic tcg
> tests, so I'll do that and resend in a few days.

That seems reasonable. I'm curious how much of check-tcg runs on BSD at
the moment?

>
> Warner
>
> On Sat, Nov 27, 2021 at 1:19 PM Warner Losh <imp@bsdimp.com> wrote:
>
>  This series adds a number of simple binaries that FreeBSD's clang can build on
>  any system. I've kept it simple so that there's no extra binaries that need to
>  be installed. Given the current state of bsd-user in the project's repo, this
>  likely is as extensive a set of tests that should be done right now. We can load
>  static binaries only (so these are static binaries) and hello world is the
>  canonical test. I have binaries for all the supported FreeBSD targets, but have
>  included only the ones that are in upstream (or in review) at this time.
>
>  In the future, I'll integreate with the tcg tests when there's more in upstream
>  they can test.  Since that requires putting together FreeBSD sysroots for all
>  the supported architectures for multiple versions, I'm going to delay that for a
>  while. I'll also integrate FreeBSD's 5k system tests when we're much further
>  along with the upstreaming.
>
>  The purpose of this is to give others doing changes in this area a standardized
>  way to ensure their changes don't fundamentally break bsd-user. This approach
>  will work for all setups that do a 'make check' to do their testing.
>
>  Based-on: 20211108035136.43687-1-imp@bsdimp.com
>
>  Warner Losh (5):
>    h.armv7: Simple hello-world test for armv7
>    h.i386: Simple hello-world test for i386
>    h.amd64: Simple hello-world test for x86_64
>    smoke-bsd-user: A test script to run all the FreeBSD binaries
>    bsd-user-smoke: Add to build
>
>   tests/bsd-user-smoke/h.amd64.S      | 28 +++++++++++++++++++++
>   tests/bsd-user-smoke/h.armv7.S      | 37 +++++++++++++++++++++++++++
>   tests/bsd-user-smoke/h.i386.S       | 39 +++++++++++++++++++++++++++++
>   tests/bsd-user-smoke/meson.build    | 31 +++++++++++++++++++++++
>   tests/bsd-user-smoke/smoke-bsd-user | 22 ++++++++++++++++
>   tests/meson.build                   |  1 +
>   6 files changed, 158 insertions(+)
>   create mode 100644 tests/bsd-user-smoke/h.amd64.S
>   create mode 100644 tests/bsd-user-smoke/h.armv7.S
>   create mode 100644 tests/bsd-user-smoke/h.i386.S
>   create mode 100644 tests/bsd-user-smoke/meson.build
>   create mode 100644 tests/bsd-user-smoke/smoke-bsd-user
>
>  -- 
>  2.33.0


-- 
Alex Bennée

Re: [PATCH for 7.0 0/5] bsd-user-smoke: A simple smoke test for bsd-user
Posted by Warner Losh 2 years, 3 months ago
On Tue, Jan 4, 2022 at 10:21 AM Alex Bennée <alex.bennee@linaro.org> wrote:

>
> Warner Losh <imp@bsdimp.com> writes:
>
> > PING!
> >
> > If anybody (especially the BSD reviewers) could look at these, that
> would be great!
> >
> > It's been suggested I rename bsd-user-smoke to just be bsd-user and we
> put our tests there until we can switch to the more generic tcg
> > tests, so I'll do that and resend in a few days.
>
> That seems reasonable. I'm curious how much of check-tcg runs on BSD at
> the moment?
>

About 1/3-1/2 on x86 (due to lack of signal support, the x86 stuff is
pretty basic since it's
really never evolved past it's early Blue Swirl origin phase). On other
platforms, you
need a 'sysroot' to build with the cross compiler specified. FreeBSD has
the compiler
built to build for any target by default, but not the sysroot needed and we
don't
currently have a good sysroot package that would easily drop into
automation. The
smoke test is carefully crafted to not need this. To be honest, I've not
yet tested other
architectures due to this issue with check-tcg, but will do so now that I'm
back from
the holidays. There's some other issues with bsd-user I need to focus on
first (more
changes to sys/user.h breaking the build leading to much downstream angst).

Warner


> >
> > Warner
> >
> > On Sat, Nov 27, 2021 at 1:19 PM Warner Losh <imp@bsdimp.com> wrote:
> >
> >  This series adds a number of simple binaries that FreeBSD's clang can
> build on
> >  any system. I've kept it simple so that there's no extra binaries that
> need to
> >  be installed. Given the current state of bsd-user in the project's
> repo, this
> >  likely is as extensive a set of tests that should be done right now. We
> can load
> >  static binaries only (so these are static binaries) and hello world is
> the
> >  canonical test. I have binaries for all the supported FreeBSD targets,
> but have
> >  included only the ones that are in upstream (or in review) at this time.
> >
> >  In the future, I'll integreate with the tcg tests when there's more in
> upstream
> >  they can test.  Since that requires putting together FreeBSD sysroots
> for all
> >  the supported architectures for multiple versions, I'm going to delay
> that for a
> >  while. I'll also integrate FreeBSD's 5k system tests when we're much
> further
> >  along with the upstreaming.
> >
> >  The purpose of this is to give others doing changes in this area a
> standardized
> >  way to ensure their changes don't fundamentally break bsd-user. This
> approach
> >  will work for all setups that do a 'make check' to do their testing.
> >
> >  Based-on: 20211108035136.43687-1-imp@bsdimp.com
> >
> >  Warner Losh (5):
> >    h.armv7: Simple hello-world test for armv7
> >    h.i386: Simple hello-world test for i386
> >    h.amd64: Simple hello-world test for x86_64
> >    smoke-bsd-user: A test script to run all the FreeBSD binaries
> >    bsd-user-smoke: Add to build
> >
> >   tests/bsd-user-smoke/h.amd64.S      | 28 +++++++++++++++++++++
> >   tests/bsd-user-smoke/h.armv7.S      | 37 +++++++++++++++++++++++++++
> >   tests/bsd-user-smoke/h.i386.S       | 39 +++++++++++++++++++++++++++++
> >   tests/bsd-user-smoke/meson.build    | 31 +++++++++++++++++++++++
> >   tests/bsd-user-smoke/smoke-bsd-user | 22 ++++++++++++++++
> >   tests/meson.build                   |  1 +
> >   6 files changed, 158 insertions(+)
> >   create mode 100644 tests/bsd-user-smoke/h.amd64.S
> >   create mode 100644 tests/bsd-user-smoke/h.armv7.S
> >   create mode 100644 tests/bsd-user-smoke/h.i386.S
> >   create mode 100644 tests/bsd-user-smoke/meson.build
> >   create mode 100644 tests/bsd-user-smoke/smoke-bsd-user
> >
> >  --
> >  2.33.0
>
>
> --
> Alex Bennée
>