All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] configure: Check for KVM linker script support
Date: Fri, 10 Jun 2022 15:33:21 +0200	[thread overview]
Message-ID: <YqNIIb/NFVBjsZdb@rei> (raw)
In-Reply-To: <20220610131442.5032-1-mdoucha@suse.cz>

Hi!
> Some toolchains don't fully support the KVM linker scripts. Disable KVM tests
> if linker check fails in configure script.
> 
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
>  configure.ac              | 14 ++++++++++++++
>  include/mk/features.mk.in |  3 +++
>  testcases/kernel/Makefile |  5 ++++-
>  3 files changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 816ebf820..88ecbafda 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -397,6 +397,20 @@ LTP_CHECK_TASKSTATS
>  test "x$with_tirpc" = xyes && LTP_CHECK_TIRPC
>  LTP_DETECT_HOST_CPU
>  
> +AC_MSG_CHECKING([whether linker can handle KVM payloads])
> +ltp_backup_ldflags=$LDFLAGS
> +LDFLAGS="$LDFLAGS -T ${srcdir}/testcases/kernel/kvm/linker/${HOST_CPU}.lds"
> +AC_LINK_IFELSE([AC_LANG_PROGRAM()],
> +  [
> +    AC_MSG_RESULT([yes])
> +    AC_SUBST([WITH_KVM_TESTSUITE],["yes"])
> +  ],
> +  [
> +    AC_MSG_RESULT([no])
> +    AC_SUBST([WITH_KVM_TESTSUITE],["no"])
> +  ])
> +LDFLAGS="$ltp_backup_ldflags"
> +
>  AC_OUTPUT
>  
>  cat << EOF
> diff --git a/include/mk/features.mk.in b/include/mk/features.mk.in
> index ecb15a0f7..802ee0ba8 100644
> --- a/include/mk/features.mk.in
> +++ b/include/mk/features.mk.in
> @@ -52,3 +52,6 @@ WITH_REALTIME_TESTSUITE		:= no
>  else
>  WITH_REALTIME_TESTSUITE		:= @WITH_REALTIME_TESTSUITE@
>  endif
> +
> +# Enable testcases/kernel/kvm compile and install?
> +WITH_KVM_TESTSUITE		:= @WITH_KVM_TESTSUITE@
> diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
> index c0fa24147..bf890e175 100644
> --- a/testcases/kernel/Makefile
> +++ b/testcases/kernel/Makefile
> @@ -29,7 +29,6 @@ SUBDIRS			+= connectors \
>  			   io \
>  			   ipc \
>  			   irq \
> -			   kvm \
>  			   logging \
>  			   mem \
>  			   numa \
> @@ -45,6 +44,10 @@ ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
>  SUBDIRS			+= power_management
>  endif
>  
> +ifeq ($(WITH_KVM_TESTSUITE),yes)
> +SUBDIRS			+= kvm
> +endif

Skipping the whole directory will actually cause problems too, since the
runltp files does include the kvm_pagefault01 now which will obvious
fail because the binary would be missing.

I'm not sure what the best solution would be, maybe install dummy
libraries that just print TCONF in a case that linker does now work?

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-06-10 13:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 13:14 [LTP] [PATCH] configure: Check for KVM linker script support Martin Doucha
2022-06-10 13:33 ` Cyril Hrubis [this message]
2022-06-10 13:39   ` Cyril Hrubis
2022-06-10 14:42   ` Martin Doucha
2022-06-13  8:15     ` Cyril Hrubis
2022-06-13 11:59       ` Petr Vorel
2022-06-13 12:54         ` Martin Doucha
2022-06-13 13:49           ` Petr Vorel

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=YqNIIb/NFVBjsZdb@rei \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.