All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] openssl: fix ptest case `test_symbol_presence' failed
@ 2018-09-30  6:39 Hongxu Jia
  2018-10-01 12:07 ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Hongxu Jia @ 2018-09-30  6:39 UTC (permalink / raw)
  To: openembedded-core, ross.burton

The case in ptest use `nm -Pg libcrypto.so.1.1' to check symbol presence,
hence we need to inhibit package split and package debug split.

The binutils provides `nm', hence add it to ptest runtime depends.
(Without `nm', the test_symbol_presence will be skipped, that's the
reason why ptest passed on a small image, and failed on a full image)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-connectivity/openssl/openssl_1.1.1.bb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
index 73bcb27..673b0f9 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
@@ -151,6 +151,12 @@ do_install_ptest () {
 	cp -r * ${D}${PTEST_PATH}
 }
 
+# The ptest case uses `nm -Pg libcrypto.so.1.1' to check symbol presence
+INHIBIT_PACKAGE_STRIP = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '1', '0', d)}"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '1', '0', d)}"
+# The binutils provides `nm'
+RDEPENDS_${PN}-ptest += "binutils"
+
 PRIVATE_LIBS_${PN}-ptest = "libcrypto.so.1.1 libssl.so.1.1"
 
 # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] openssl: fix ptest case `test_symbol_presence' failed
  2018-09-30  6:39 [PATCH] openssl: fix ptest case `test_symbol_presence' failed Hongxu Jia
@ 2018-10-01 12:07 ` Richard Purdie
  2018-10-01 15:47   ` Hongxu Jia
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2018-10-01 12:07 UTC (permalink / raw)
  To: Hongxu Jia, openembedded-core, ross.burton

On Sun, 2018-09-30 at 14:39 +0800, Hongxu Jia wrote:
> The case in ptest use `nm -Pg libcrypto.so.1.1' to check symbol
> presence,
> hence we need to inhibit package split and package debug split.
> 
> The binutils provides `nm', hence add it to ptest runtime depends.
> (Without `nm', the test_symbol_presence will be skipped, that's the
> reason why ptest passed on a small image, and failed on a full image)
> 
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  meta/recipes-connectivity/openssl/openssl_1.1.1.bb | 6 ++++++
>  1 file changed, 6 insertions(+)

Breaking packaging when enabling ptest is not a nice or desirable
behaviour. I'd actually much rather just disable this test, or tweak it
to work on the -dbg package. Does the test pass if the dbg package is
installed?

Cheers,

Richard



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] openssl: fix ptest case `test_symbol_presence' failed
  2018-10-01 12:07 ` Richard Purdie
@ 2018-10-01 15:47   ` Hongxu Jia
  2018-10-01 15:47     ` [PATCH V2] " Hongxu Jia
  0 siblings, 1 reply; 7+ messages in thread
From: Hongxu Jia @ 2018-10-01 15:47 UTC (permalink / raw)
  To: openembedded-core, richard.purdie

The case in ptest use `nm -Pg libcrypto.so' to check symbol presence,
if library is stripped or debug split, the case will fail.

The dbg library keeps symbol table, so tweak to check on it.

Use wildcard `libcrypto.so*' rather than `libcrypto.so.1.1' to compat
the subsequent version upgrade.

The binutils provides `nm', hence add it to ptest runtime depends.
(Without `nm', the test_symbol_presence will be skipped, that's the
reason why ptest passed on a small image, and failed on a full image)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 ...test_symbol_presence-check-on-dbg-library.patch | 36 ++++++++++++++++++++++
 meta/recipes-connectivity/openssl/openssl_1.1.1.bb |  6 ++++
 2 files changed, 42 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch

diff --git a/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch b/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
new file mode 100644
index 0000000..3999aa0
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
@@ -0,0 +1,36 @@
+From 2766dc8af70ced2854a6817e67cbac234c99f91f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 1 Oct 2018 22:16:53 +0800
+Subject: [PATCH] test_symbol_presence: check on dbg library
+
+The case uses `nm -Pg libcrypto.so' to check symbol presence,
+if library is stripped or debug splited, the case will fail.
+
+The dbg library has the symbol table, so tweak to check on it.
+
+Use wildcard `libcrypto.so*' rather than `libcrypto.so.1.1' to compat
+the subsequent version upgrade.
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ test/recipes/01-test_symbol_presence.t | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t
+index 7f2a2d7..1668cde 100644
+--- a/test/recipes/01-test_symbol_presence.t
++++ b/test/recipes/01-test_symbol_presence.t
+@@ -32,7 +32,7 @@ note
+ foreach my $libname (@libnames) {
+  SKIP:
+     {
+-        my $shlibpath = bldtop_file("lib" . $libname . ".so");
++        my $shlibpath = bldtop_file(".debug/" . "lib" . $libname . ".so*");
+         *OSTDERR = *STDERR;
+         *OSTDOUT = *STDOUT;
+         open STDERR, ">", devnull();
+-- 
+2.7.4
+
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
index 73bcb27..74b3417 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
@@ -13,6 +13,7 @@ DEPENDS = "hostperl-runtime-native"
 SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
            file://run-ptest \
            file://openssl-c_rehash.sh \
+           file://0001-test_symbol_presence-check-on-dbg-library.patch \
            "
 
 SRC_URI_append_class-nativesdk = " \
@@ -174,6 +175,11 @@ RRECOMMENDS_libcrypto += "openssl-conf"
 RDEPENDS_${PN}-bin = "perl"
 RDEPENDS_${PN}-misc = "perl"
 RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
+# The ptest case uses `nm -Pg .debug/libcrypto.so*' to check symbol presence
+RDEPENDS_${PN}-ptest += "${PN}-dbg"
+INSANE_SKIP_${PN}-ptest ?= "debug-deps"
+# The binutils provides `nm'
+RDEPENDS_${PN}-ptest += "binutils"
 
 RPROVIDES_openssl-conf = "openssl10-conf"
 RREPLACES_openssl-conf = "openssl10-conf"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] openssl: fix ptest case `test_symbol_presence' failed
  2018-10-01 15:47   ` Hongxu Jia
@ 2018-10-01 15:47     ` Hongxu Jia
  2018-10-01 19:46       ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Hongxu Jia @ 2018-10-01 15:47 UTC (permalink / raw)
  To: openembedded-core, richard.purdie

Sorry for missing V2 in subject

//Hongxu

On 2018年10月01日 23:47, Hongxu Jia wrote:
> The case in ptest use `nm -Pg libcrypto.so' to check symbol presence,
> if library is stripped or debug split, the case will fail.
>
> The dbg library keeps symbol table, so tweak to check on it.
>
> Use wildcard `libcrypto.so*' rather than `libcrypto.so.1.1' to compat
> the subsequent version upgrade.
>
> The binutils provides `nm', hence add it to ptest runtime depends.
> (Without `nm', the test_symbol_presence will be skipped, that's the
> reason why ptest passed on a small image, and failed on a full image)
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>   ...test_symbol_presence-check-on-dbg-library.patch | 36 ++++++++++++++++++++++
>   meta/recipes-connectivity/openssl/openssl_1.1.1.bb |  6 ++++
>   2 files changed, 42 insertions(+)
>   create mode 100644 meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
>
> diff --git a/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch b/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
> new file mode 100644
> index 0000000..3999aa0
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
> @@ -0,0 +1,36 @@
> +From 2766dc8af70ced2854a6817e67cbac234c99f91f Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Mon, 1 Oct 2018 22:16:53 +0800
> +Subject: [PATCH] test_symbol_presence: check on dbg library
> +
> +The case uses `nm -Pg libcrypto.so' to check symbol presence,
> +if library is stripped or debug splited, the case will fail.
> +
> +The dbg library has the symbol table, so tweak to check on it.
> +
> +Use wildcard `libcrypto.so*' rather than `libcrypto.so.1.1' to compat
> +the subsequent version upgrade.
> +
> +Upstream-Status: Inappropriate [OE Specific]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + test/recipes/01-test_symbol_presence.t | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t
> +index 7f2a2d7..1668cde 100644
> +--- a/test/recipes/01-test_symbol_presence.t
> ++++ b/test/recipes/01-test_symbol_presence.t
> +@@ -32,7 +32,7 @@ note
> + foreach my $libname (@libnames) {
> +  SKIP:
> +     {
> +-        my $shlibpath = bldtop_file("lib" . $libname . ".so");
> ++        my $shlibpath = bldtop_file(".debug/" . "lib" . $libname . ".so*");
> +         *OSTDERR = *STDERR;
> +         *OSTDOUT = *STDOUT;
> +         open STDERR, ">", devnull();
> +--
> +2.7.4
> +
> diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
> index 73bcb27..74b3417 100644
> --- a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
> +++ b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
> @@ -13,6 +13,7 @@ DEPENDS = "hostperl-runtime-native"
>   SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
>              file://run-ptest \
>              file://openssl-c_rehash.sh \
> +           file://0001-test_symbol_presence-check-on-dbg-library.patch \
>              "
>   
>   SRC_URI_append_class-nativesdk = " \
> @@ -174,6 +175,11 @@ RRECOMMENDS_libcrypto += "openssl-conf"
>   RDEPENDS_${PN}-bin = "perl"
>   RDEPENDS_${PN}-misc = "perl"
>   RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
> +# The ptest case uses `nm -Pg .debug/libcrypto.so*' to check symbol presence
> +RDEPENDS_${PN}-ptest += "${PN}-dbg"
> +INSANE_SKIP_${PN}-ptest ?= "debug-deps"
> +# The binutils provides `nm'
> +RDEPENDS_${PN}-ptest += "binutils"
>   
>   RPROVIDES_openssl-conf = "openssl10-conf"
>   RREPLACES_openssl-conf = "openssl10-conf"




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] openssl: fix ptest case `test_symbol_presence' failed
  2018-10-01 15:47     ` [PATCH V2] " Hongxu Jia
@ 2018-10-01 19:46       ` Burton, Ross
  2018-10-02 16:00         ` Hongxu Jia
  2018-10-02 16:58         ` [PATCH V3] openssl: skip ptest case `test_symbol_presence' Hongxu Jia
  0 siblings, 2 replies; 7+ messages in thread
From: Burton, Ross @ 2018-10-01 19:46 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: OE-core

If the test case needs debug symbols then I'd suggest we just disable
that test.  Especially as the test starts with this comment:

"NOTE: developer test! It's possible that it won't run on your\n",
"platform, and that's perfectly fine. This is mainly for developers\n",

Ross
On Mon, 1 Oct 2018 at 16:49, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>
> Sorry for missing V2 in subject
>
> //Hongxu
>
> On 2018年10月01日 23:47, Hongxu Jia wrote:
> > The case in ptest use `nm -Pg libcrypto.so' to check symbol presence,
> > if library is stripped or debug split, the case will fail.
> >
> > The dbg library keeps symbol table, so tweak to check on it.
> >
> > Use wildcard `libcrypto.so*' rather than `libcrypto.so.1.1' to compat
> > the subsequent version upgrade.
> >
> > The binutils provides `nm', hence add it to ptest runtime depends.
> > (Without `nm', the test_symbol_presence will be skipped, that's the
> > reason why ptest passed on a small image, and failed on a full image)
> >
> > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> > ---
> >   ...test_symbol_presence-check-on-dbg-library.patch | 36 ++++++++++++++++++++++
> >   meta/recipes-connectivity/openssl/openssl_1.1.1.bb |  6 ++++
> >   2 files changed, 42 insertions(+)
> >   create mode 100644 meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
> >
> > diff --git a/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch b/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
> > new file mode 100644
> > index 0000000..3999aa0
> > --- /dev/null
> > +++ b/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
> > @@ -0,0 +1,36 @@
> > +From 2766dc8af70ced2854a6817e67cbac234c99f91f Mon Sep 17 00:00:00 2001
> > +From: Hongxu Jia <hongxu.jia@windriver.com>
> > +Date: Mon, 1 Oct 2018 22:16:53 +0800
> > +Subject: [PATCH] test_symbol_presence: check on dbg library
> > +
> > +The case uses `nm -Pg libcrypto.so' to check symbol presence,
> > +if library is stripped or debug splited, the case will fail.
> > +
> > +The dbg library has the symbol table, so tweak to check on it.
> > +
> > +Use wildcard `libcrypto.so*' rather than `libcrypto.so.1.1' to compat
> > +the subsequent version upgrade.
> > +
> > +Upstream-Status: Inappropriate [OE Specific]
> > +
> > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> > +---
> > + test/recipes/01-test_symbol_presence.t | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t
> > +index 7f2a2d7..1668cde 100644
> > +--- a/test/recipes/01-test_symbol_presence.t
> > ++++ b/test/recipes/01-test_symbol_presence.t
> > +@@ -32,7 +32,7 @@ note
> > + foreach my $libname (@libnames) {
> > +  SKIP:
> > +     {
> > +-        my $shlibpath = bldtop_file("lib" . $libname . ".so");
> > ++        my $shlibpath = bldtop_file(".debug/" . "lib" . $libname . ".so*");
> > +         *OSTDERR = *STDERR;
> > +         *OSTDOUT = *STDOUT;
> > +         open STDERR, ">", devnull();
> > +--
> > +2.7.4
> > +
> > diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
> > index 73bcb27..74b3417 100644
> > --- a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
> > +++ b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
> > @@ -13,6 +13,7 @@ DEPENDS = "hostperl-runtime-native"
> >   SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
> >              file://run-ptest \
> >              file://openssl-c_rehash.sh \
> > +           file://0001-test_symbol_presence-check-on-dbg-library.patch \
> >              "
> >
> >   SRC_URI_append_class-nativesdk = " \
> > @@ -174,6 +175,11 @@ RRECOMMENDS_libcrypto += "openssl-conf"
> >   RDEPENDS_${PN}-bin = "perl"
> >   RDEPENDS_${PN}-misc = "perl"
> >   RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
> > +# The ptest case uses `nm -Pg .debug/libcrypto.so*' to check symbol presence
> > +RDEPENDS_${PN}-ptest += "${PN}-dbg"
> > +INSANE_SKIP_${PN}-ptest ?= "debug-deps"
> > +# The binutils provides `nm'
> > +RDEPENDS_${PN}-ptest += "binutils"
> >
> >   RPROVIDES_openssl-conf = "openssl10-conf"
> >   RREPLACES_openssl-conf = "openssl10-conf"
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] openssl: fix ptest case `test_symbol_presence' failed
  2018-10-01 19:46       ` Burton, Ross
@ 2018-10-02 16:00         ` Hongxu Jia
  2018-10-02 16:58         ` [PATCH V3] openssl: skip ptest case `test_symbol_presence' Hongxu Jia
  1 sibling, 0 replies; 7+ messages in thread
From: Hongxu Jia @ 2018-10-02 16:00 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 2018年10月02日 03:46, Burton, Ross wrote:
> If the test case needs debug symbols then I'd suggest we just disable
> that test.  Especially as the test starts with this comment:
>
> "NOTE: developer test! It's possible that it won't run on your\n",
> "platform, and that's perfectly fine. This is mainly for developers\n",
The whole comment is to emphasize the test works on Unix
(which includes Linux I think)
[snip]
note
     "NOTE: developer test!  It's possible that it won't run on your\n",
     "platform, and that's perfectly fine.  This is mainly for 
developers\n",
     "on Unix to check that our shared libraries are consistent with the\n",
     "ordinals (util/*.num in the source tree), something that should be\n",
     "good enough a check for the other platforms as well.\n";
[snip]

But, the ptest runtime depends dbg package for a single case breaks sanity
check, and the case of test symbol presence is not critical, so disable 
it is
an acceptable option, V3 incoming

//Hongxu


> Ross
> On Mon, 1 Oct 2018 at 16:49, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>> Sorry for missing V2 in subject
>>
>> //Hongxu
>>
>> On 2018年10月01日 23:47, Hongxu Jia wrote:
>>> The case in ptest use `nm -Pg libcrypto.so' to check symbol presence,
>>> if library is stripped or debug split, the case will fail.
>>>
>>> The dbg library keeps symbol table, so tweak to check on it.
>>>
>>> Use wildcard `libcrypto.so*' rather than `libcrypto.so.1.1' to compat
>>> the subsequent version upgrade.
>>>
>>> The binutils provides `nm', hence add it to ptest runtime depends.
>>> (Without `nm', the test_symbol_presence will be skipped, that's the
>>> reason why ptest passed on a small image, and failed on a full image)
>>>
>>> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>>> ---
>>>    ...test_symbol_presence-check-on-dbg-library.patch | 36 ++++++++++++++++++++++
>>>    meta/recipes-connectivity/openssl/openssl_1.1.1.bb |  6 ++++
>>>    2 files changed, 42 insertions(+)
>>>    create mode 100644 meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
>>>
>>> diff --git a/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch b/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
>>> new file mode 100644
>>> index 0000000..3999aa0
>>> --- /dev/null
>>> +++ b/meta/recipes-connectivity/openssl/openssl/0001-test_symbol_presence-check-on-dbg-library.patch
>>> @@ -0,0 +1,36 @@
>>> +From 2766dc8af70ced2854a6817e67cbac234c99f91f Mon Sep 17 00:00:00 2001
>>> +From: Hongxu Jia <hongxu.jia@windriver.com>
>>> +Date: Mon, 1 Oct 2018 22:16:53 +0800
>>> +Subject: [PATCH] test_symbol_presence: check on dbg library
>>> +
>>> +The case uses `nm -Pg libcrypto.so' to check symbol presence,
>>> +if library is stripped or debug splited, the case will fail.
>>> +
>>> +The dbg library has the symbol table, so tweak to check on it.
>>> +
>>> +Use wildcard `libcrypto.so*' rather than `libcrypto.so.1.1' to compat
>>> +the subsequent version upgrade.
>>> +
>>> +Upstream-Status: Inappropriate [OE Specific]
>>> +
>>> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>>> +---
>>> + test/recipes/01-test_symbol_presence.t | 2 +-
>>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>>> +
>>> +diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t
>>> +index 7f2a2d7..1668cde 100644
>>> +--- a/test/recipes/01-test_symbol_presence.t
>>> ++++ b/test/recipes/01-test_symbol_presence.t
>>> +@@ -32,7 +32,7 @@ note
>>> + foreach my $libname (@libnames) {
>>> +  SKIP:
>>> +     {
>>> +-        my $shlibpath = bldtop_file("lib" . $libname . ".so");
>>> ++        my $shlibpath = bldtop_file(".debug/" . "lib" . $libname . ".so*");
>>> +         *OSTDERR = *STDERR;
>>> +         *OSTDOUT = *STDOUT;
>>> +         open STDERR, ">", devnull();
>>> +--
>>> +2.7.4
>>> +
>>> diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
>>> index 73bcb27..74b3417 100644
>>> --- a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
>>> +++ b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
>>> @@ -13,6 +13,7 @@ DEPENDS = "hostperl-runtime-native"
>>>    SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
>>>               file://run-ptest \
>>>               file://openssl-c_rehash.sh \
>>> +           file://0001-test_symbol_presence-check-on-dbg-library.patch \
>>>               "
>>>
>>>    SRC_URI_append_class-nativesdk = " \
>>> @@ -174,6 +175,11 @@ RRECOMMENDS_libcrypto += "openssl-conf"
>>>    RDEPENDS_${PN}-bin = "perl"
>>>    RDEPENDS_${PN}-misc = "perl"
>>>    RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python"
>>> +# The ptest case uses `nm -Pg .debug/libcrypto.so*' to check symbol presence
>>> +RDEPENDS_${PN}-ptest += "${PN}-dbg"
>>> +INSANE_SKIP_${PN}-ptest ?= "debug-deps"
>>> +# The binutils provides `nm'
>>> +RDEPENDS_${PN}-ptest += "binutils"
>>>
>>>    RPROVIDES_openssl-conf = "openssl10-conf"
>>>    RREPLACES_openssl-conf = "openssl10-conf"
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH V3] openssl: skip ptest case `test_symbol_presence'
  2018-10-01 19:46       ` Burton, Ross
  2018-10-02 16:00         ` Hongxu Jia
@ 2018-10-02 16:58         ` Hongxu Jia
  1 sibling, 0 replies; 7+ messages in thread
From: Hongxu Jia @ 2018-10-02 16:58 UTC (permalink / raw)
  To: openembedded-core, richard.purdie, ross.burton

The case in ptest use `nm -Pg libcrypto.so' to check symbol presence,
if library is stripped or debug split, the case will fail.

The test case needs debug symbols then we just disable that test.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../openssl/0001-skip-test_symbol_presence.patch   | 46 ++++++++++++++++++++++
 meta/recipes-connectivity/openssl/openssl_1.1.1.bb |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssl/openssl/0001-skip-test_symbol_presence.patch

diff --git a/meta/recipes-connectivity/openssl/openssl/0001-skip-test_symbol_presence.patch b/meta/recipes-connectivity/openssl/openssl/0001-skip-test_symbol_presence.patch
new file mode 100644
index 0000000..d8d9651
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/0001-skip-test_symbol_presence.patch
@@ -0,0 +1,46 @@
+From a9401b2289656c5a36dd1b0ecebf0d23e291ce70 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 2 Oct 2018 23:58:24 +0800
+Subject: [PATCH] skip test_symbol_presence
+
+We cannot skip `01-test_symbol_presence.t' by configuring option `no-shared'
+as INSTALL told us the shared libraries will not be built.
+
+[INSTALL snip]
+ Notes on shared libraries
+ -------------------------
+
+ For most systems the OpenSSL Configure script knows what is needed to
+ build shared libraries for libcrypto and libssl. On these systems
+ the shared libraries will be created by default. This can be suppressed and
+ only static libraries created by using the "no-shared" option. On systems
+ where OpenSSL does not know how to build shared libraries the "no-shared"
+ option will be forced and only static libraries will be created.
+[INSTALL snip]
+
+Hence directly modification the case to skip it.
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ test/recipes/01-test_symbol_presence.t | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t
+index 7f2a2d7..0b93745 100644
+--- a/test/recipes/01-test_symbol_presence.t
++++ b/test/recipes/01-test_symbol_presence.t
+@@ -14,8 +14,7 @@ use OpenSSL::Test::Utils;
+ 
+ setup("test_symbol_presence");
+ 
+-plan skip_all => "Only useful when building shared libraries"
+-    if disabled("shared");
++plan skip_all => "The case needs debug symbols then we just disable it";
+ 
+ my @libnames = ("crypto", "ssl");
+ my $testcount = scalar @libnames;
+-- 
+2.7.4
+
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
index 73bcb27..5a43a15 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb
@@ -13,6 +13,7 @@ DEPENDS = "hostperl-runtime-native"
 SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
            file://run-ptest \
            file://openssl-c_rehash.sh \
+           file://0001-skip-test_symbol_presence.patch \
            "
 
 SRC_URI_append_class-nativesdk = " \
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-10-02 16:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-30  6:39 [PATCH] openssl: fix ptest case `test_symbol_presence' failed Hongxu Jia
2018-10-01 12:07 ` Richard Purdie
2018-10-01 15:47   ` Hongxu Jia
2018-10-01 15:47     ` [PATCH V2] " Hongxu Jia
2018-10-01 19:46       ` Burton, Ross
2018-10-02 16:00         ` Hongxu Jia
2018-10-02 16:58         ` [PATCH V3] openssl: skip ptest case `test_symbol_presence' Hongxu Jia

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.