From: Saul Wold <sgw@linux.intel.com>
To: Tudor Florea <tudor.florea@enea.com>
Cc: "Maxin B. John" <maxin.john@enea.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] kmod: ptest fixes
Date: Mon, 30 Sep 2013 10:39:39 -0700 [thread overview]
Message-ID: <5249B75B.6090602@linux.intel.com> (raw)
In-Reply-To: <1380490304-58258-1-git-send-email-tudor.florea@enea.com>
On 09/29/2013 02:31 PM, Tudor Florea wrote:
> Make kmod-ptest able to compile with separated source and
> build dir. Add exception to insane.bbclass allowing any
> type of binaries in ptest packages. Since kmod test files
> contain kernel modules for many different architectures,
> strip gets confused and throws an error.
>
> Signed-off-by: Tudor Florea <tudor.florea@enea.com>
> Signed-off-by: Björn Stenberg <bjst@enea.com>
> Signed-off-by: Maxin B. John <maxin.john@enea.com>
> ---
> meta/classes/insane.bbclass | 4 ++++
> meta/recipes-kernel/kmod/kmod/ptest.patch | 8 ++++----
> meta/recipes-kernel/kmod/kmod/run-ptest | 4 +---
> meta/recipes-kernel/kmod/kmod_git.bb | 5 +++--
> 4 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index a784aff..898d2ca 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -434,6 +434,10 @@ def package_qa_check_arch(path,name,d, elf, messages):
> if os.path.islink(path):
> return
>
> + # ptest packages can contain any file types whatsoever
> + if name.endswith("-ptest"):
> + return
> +
I think that this is too board an approach, if kmod provides binaries
for multiple architectures, then that particular package should be
skipped using the INSANE_SKIP_kmod-ptest = "arch" setting in
kmod_git.bb. How many other ptest packages have this issue?
Sau!
> #if this will throw an exception, then fix the dict above
> (machine, osabi, abiversion, littleendian, bits) \
> = package_qa_get_machine_dict()[target_os][target_arch]
> diff --git a/meta/recipes-kernel/kmod/kmod/ptest.patch b/meta/recipes-kernel/kmod/kmod/ptest.patch
> index c6479b2..831dbcb 100644
> --- a/meta/recipes-kernel/kmod/kmod/ptest.patch
> +++ b/meta/recipes-kernel/kmod/kmod/ptest.patch
> @@ -15,10 +15,10 @@ diff -ruN a/Makefile.am b/Makefile.am
> + @for file in $(TESTSUITE); do \
> + install $$file $(DESTDIR)/testsuite; \
> + done;
> -+ @cp Makefile $(DESTDIR)
> -+ @sed -i 's/^Makefile/_Makefile/' ${DESTDIR}/Makefile
> -+ @tar -czf $(DESTDIR)/tools.tgz $(noinst_SCRIPTS) $(noinst_PROGRAMS)
> -+ @tar -C testsuite -czf $(DESTDIR)/testsuite.tgz rootfs-pristine .libs
> ++ @sed -e 's/^Makefile/_Makefile/' < Makefile > $(DESTDIR)/Makefile
> ++ @$(MKDIR_P) $(DESTDIR)/tools
> ++ @cp $(noinst_SCRIPTS) $(noinst_PROGRAMS) $(DESTDIR)/tools
> ++ @cp -r testsuite/rootfs testsuite/.libs $(DESTDIR)/testsuite
> +
> # ------------------------------------------------------------------------------
> # custom release helpers
> diff --git a/meta/recipes-kernel/kmod/kmod/run-ptest b/meta/recipes-kernel/kmod/kmod/run-ptest
> index fac24fd..37adec3 100755
> --- a/meta/recipes-kernel/kmod/kmod/run-ptest
> +++ b/meta/recipes-kernel/kmod/kmod/run-ptest
> @@ -1,5 +1,3 @@
> #!/bin/sh
> -tar -xzf tools.tgz
> -tar -C testsuite -xzf testsuite.tgz
> -make rootfs
> +touch testsuite/stamp-rootfs
> make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL
> diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb
> index b07c06e..0a8af7b 100644
> --- a/meta/recipes-kernel/kmod/kmod_git.bb
> +++ b/meta/recipes-kernel/kmod/kmod_git.bb
> @@ -41,10 +41,11 @@ do_compile_prepend() {
> }
>
> do_compile_ptest () {
> - oe_runmake buildtest-TESTS
> - oe_runmake rootfs
> + oe_runmake buildtest-TESTS rootfs
> }
>
> +INHIBIT_PACKAGE_STRIP = "${@base_contains("DISTRO_FEATURES", "ptest", "1", "0", d)}"
> +
> inherit update-alternatives
>
> ALTERNATIVE_PRIORITY = "60"
>
next prev parent reply other threads:[~2013-09-30 17:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-29 21:31 [PATCH] kmod: ptest fixes Tudor Florea
2013-09-30 17:39 ` Saul Wold [this message]
2013-10-01 22:54 ` [PATCH v2] " Tudor Florea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5249B75B.6090602@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=maxin.john@enea.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=tudor.florea@enea.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox