All of lore.kernel.org
 help / color / mirror / Atom feed
From: Changqing Li <changqing.li@windriver.com>
To: <openembedded-core@lists.openembedded.org>,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: Re: [PATCH V3] dbus: fix ptest failure
Date: Mon, 21 Jan 2019 15:47:31 +0800	[thread overview]
Message-ID: <e28bcecd-2cc1-28b4-1c47-e9b86ed52bf3@windriver.com> (raw)
In-Reply-To: <1541388536-121953-1-git-send-email-changqing.li@windriver.com>

Hi, Richard

Could you help to review this patch? Thanks.

On 11/5/18 11:28 AM, changqing.li@windriver.com wrote:
> From: Changqing Li <changqing.li@windriver.com>
>
> 1. since one bug in run-ptest, testcase test-bus have never been
> actually run (althrough it's result is PASS).
>
> After commit 0828850, test-bus can actually run but it
> did not install:
>    test-service, test-shell-service, test-segfault, and
>    dbus-daemon-launch-helper-test
> Add the configure flag:
>    --enable-embedded-tests
> to generate binary dbus-daemon-launch-helper-test, then install
> them so that test-bus will now pass.
>
> 2. fix testcase test-dbus-daemon failed
> we enable --enable-verbose-mode in recipe dbus-test, and don't
> enable it in recipe dbus. This will make below test code get
> unexpect result of have_verbose and assert.
> disable --enable-verbose-mode for recipe dbus-test to fix it.
>
>   #ifdef DBUS_ENABLE_STATS
>    g_assert_true (have_stats);
>   #else
>    g_assert_false (have_stats);
>   #endif
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>   meta/recipes-core/dbus/dbus-test_1.12.10.bb | 12 +++++++++---
>   meta/recipes-core/dbus/dbus/run-ptest       | 16 ++++++++++++----
>   2 files changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/meta/recipes-core/dbus/dbus-test_1.12.10.bb b/meta/recipes-core/dbus/dbus-test_1.12.10.bb
> index 25b9395..ec9b9e2 100644
> --- a/meta/recipes-core/dbus/dbus-test_1.12.10.bb
> +++ b/meta/recipes-core/dbus/dbus-test_1.12.10.bb
> @@ -33,13 +33,13 @@ EXTRA_OECONF = "--enable-tests \
>                   --enable-installed-tests \
>                   --enable-checks \
>                   --enable-asserts \
> -                --enable-verbose-mode \
>                   --enable-largefile \
>                   --disable-xml-docs \
>                   --disable-doxygen-docs \
>                   --disable-libaudit \
>                   --with-dbus-test-dir=${PTEST_PATH} \
> -                ${EXTRA_OECONF_X}"
> +                ${EXTRA_OECONF_X} \
> +                --enable-embedded-tests"
>   
>   EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
>   
> @@ -50,6 +50,7 @@ PACKAGECONFIG_class-nativesdk = ""
>   PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
>   PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
>   PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
> +PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,,"
>   
>   do_install() {
>       :
> @@ -58,9 +59,14 @@ do_install() {
>   do_install_ptest() {
>   	install -d ${D}${PTEST_PATH}/test
>   	l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay \
> -	   variant uid-permissions syntax spawn sd-activation names monitor message fdpass "
> +	   variant uid-permissions syntax spawn sd-activation names monitor message fdpass service shell-service"
>   	for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
>   
> +	install -d ${D}${PTEST_PATH}/bus
> +	install ${B}/bus/.libs/dbus-daemon-launch-helper-test ${D}${PTEST_PATH}/bus
> +
> +	install ${B}/test/test-segfault ${D}${PTEST_PATH}/test
> +
>   	l="bus bus-system bus-launch-helper"
>   	for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
>   
> diff --git a/meta/recipes-core/dbus/dbus/run-ptest b/meta/recipes-core/dbus/dbus/run-ptest
> index 353ba1e..e7e1c1e 100755
> --- a/meta/recipes-core/dbus/dbus/run-ptest
> +++ b/meta/recipes-core/dbus/dbus/run-ptest
> @@ -17,8 +17,16 @@ export LD_LIBRARY_PATH=@PTEST_PATH@/test/.libs
>   files=`ls test/test-*`
>   
>   for i in $files
> -	do
> -		./$i ./test/data >/dev/null
> -		output
> -	done
> +do
> +     #these programs are used by testcase test-bus, don't run here
> +     if [ $i = "test/test-service" ] \
> +        || [ $i = "test/test-shell-service" ] \
> +        || [ $i = "test/test-segfault" ]
> +     then
> +         continue
> +     fi
> +
> +     ./$i ./test/data >/dev/null 2>&1
> +     output
> +done
>   

-- 
BRs

Sandy(Li Changqing)



  parent reply	other threads:[~2019-01-21  7:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05  3:28 [PATCH V3] dbus: fix ptest failure changqing.li
2018-11-22  7:29 ` Changqing Li
2018-12-13  1:36   ` Changqing Li
2019-01-21  7:47 ` Changqing Li [this message]
2019-04-17  8:38 ` [PATCH V4] " changqing.li
2019-04-17 22:01   ` Richard Purdie
2019-04-18  1:59     ` Changqing Li
2019-04-24 17:28       ` richard.purdie
2019-04-30 13:35         ` Burton, Ross

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=e28bcecd-2cc1-28b4-1c47-e9b86ed52bf3@windriver.com \
    --to=changqing.li@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /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.