[OE-core] [PATCH 1/1] oe_syslog.py: fix for syslog-ng

2018-08-05 Thread Chen Qi
When using syslog-ng as the syslog provider, oe_syslog test case fails
because it cannot find the syslog daemon. This is because it greps for
'syslogd' but syslog-ng's daemon is 'syslog-ng'. So fix it to check both
'syslogd' and 'syslog-ng'.

Also, when the test case fails, what I get is:
| AssertionError: 1 != 0 : No syslogd process; ps output:


This does not help user. The output is actually from the 'PS | GREP' command.
And when the 'PS | GREP' command fails, the output is always empty. So also fix
this problem. After the change, it looks like:
| AssertionError: False is not true : No syslog daemon process; ps output:
|   PID USER   VSZ STAT COMMAND
| 1 root 16476 S{systemd} /sbin/init
| 2 root 0 SW   [kthreadd]
| 3 root 0 IW   [kworker/0:0]
...

Signed-off-by: Chen Qi 
---
 meta/lib/oeqa/runtime/cases/oe_syslog.py | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/oe_syslog.py 
b/meta/lib/oeqa/runtime/cases/oe_syslog.py
index 935f10f..a92a1f2 100644
--- a/meta/lib/oeqa/runtime/cases/oe_syslog.py
+++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -10,10 +10,12 @@ class SyslogTest(OERuntimeTestCase):
 @OETestDepends(['ssh.SSHTest.test_ssh'])
 @OEHasPackage(["busybox-syslog", "sysklogd", "rsyslog", "syslog-ng"])
 def test_syslog_running(self):
-cmd = '%s  | grep -i [s]yslogd' % self.tc.target_cmds['ps']
-status, output = self.target.run(cmd)
-msg = "No syslogd process; ps output: %s" % output
+status, output = self.target.run(self.tc.target_cmds['ps'])
+msg = "Failed to execute %s" % self.tc.target_cmds['ps']
 self.assertEqual(status, 0, msg=msg)
+msg = "No syslog daemon process; %s output:\n%s" % 
(self.tc.target_cmds['ps'], output)
+hasdaemon = "syslogd" in output or "syslog-ng" in output
+self.assertTrue(hasdaemon, msg=msg)
 
 class SyslogTestConfig(OERuntimeTestCase):
 
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V2 0/1] oe_syslog.py: fix for syslog-ng

2018-08-05 Thread Chen Qi
Changes in V2:
* Run 'ps' only once, get rid of grep command and use python to check the 
existence of syslog daemon.

The following changes since commit da24071e92071ecbefe51314d82bf40f85172485:

  bitbake: toaster/orm/management/commands/lsupdates.py: Use new layerindexlib 
module (2018-08-02 10:18:27 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/oe_syslog
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/oe_syslog

Chen Qi (1):
  oe_syslog.py: fix for syslog-ng

 meta/lib/oeqa/runtime/cases/oe_syslog.py | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] base-files: fix handling of resize

2018-08-05 Thread ChenQi

ping

On 08/01/2018 01:25 PM, Chen Qi wrote:

The current handling of resize is incorrect. Using `resize > /dev/null
2>&1 && resize > /dev/null' will cause the second resize command to not
execute because 'resize > /dev/null 2>&1' will fail for resize utility
from busybox.

What we really should do is just to check whether ${bindir}/resize
is executable and execute it if so. Using '-x' is sufficient.

Signed-off-by: Chen Qi 
---
  meta/recipes-core/base-files/base-files/profile   | 6 +-
  meta/recipes-core/base-files/base-files_3.0.14.bb | 1 +
  2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files/profile 
b/meta/recipes-core/base-files/base-files/profile
index e14cb2d..9e4283e 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -24,11 +24,7 @@ fi
  # /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher which tries 
do
  # use ssh
  case $(tty 2>/dev/null) in
-   # The first invocation of resize verifies that it exists, the second
-   # does the actual resizing. This is due to that resize uses stderr to
-   # determine the size of the tty, which does not work if it is redirected
-   # to /dev/null.
-   /dev/tty[A-z]*) resize >/dev/null 2>&1 && resize >/dev/null;;
+   /dev/tty[A-z]*) [ -x @BINDIR@/resize ] && @BINDIR@/resize >/dev/null;;
  esac
  
  export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb 
b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 1c0863b..05c0562 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -121,6 +121,7 @@ do_install () {
install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile
+sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile
install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells
install -m 0755 ${WORKDIR}/share/dot.profile 
${D}${sysconfdir}/skel/.profile
install -m 0755 ${WORKDIR}/share/dot.bashrc 
${D}${sysconfdir}/skel/.bashrc



--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] Why do we use sysklogd as the default syslog?

2018-08-05 Thread ChenQi

On 07/30/2018 08:58 PM, Alexander Kanavin wrote:

2018-07-30 8:48 GMT+02:00 ChenQi :

I just noticed that we are using sysklogd as the default syslog.
meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb:VIRTUAL-RUNTIME_syslog
?= "sysklogd"

sysklogd has stopped development for about 4 years, and as far as I can see,
nobody is maintaining it.
Is there some specific reason why we want to keep it as the default syslog
for our reference images? small size?


You are welcome to improve this. Quite often the answer to such
questions is 'because no one is aware of the situation'.

Alex

In case someone is also interested in this topic, I'll add some more 
information here.


rsyslog is GPLv3 and syslog-ng uses a very different configuration style 
from traditional sysklogd.

So I guess I'll just leave things as they are now.

Best Regards,
Chen Qi
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] busybox: move init related configs to init.cfg

2018-08-05 Thread ChenQi

ping

On 07/30/2018 05:41 PM, Chen Qi wrote:

Move init related configs to init.cfg.

These config items do not make much sense unless busybox is selected
as the init manager. They should belong to init.cfg.

Signed-off-by: Chen Qi 
---
  meta/recipes-core/busybox/busybox/defconfig | 12 ++--
  meta/recipes-core/busybox/busybox/init.cfg  |  7 ++-
  2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox/defconfig 
b/meta/recipes-core/busybox/busybox/defconfig
index fbb5fd8..59d93c7 100644
--- a/meta/recipes-core/busybox/busybox/defconfig
+++ b/meta/recipes-core/busybox/busybox/defconfig
@@ -468,21 +468,21 @@ CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y
  # CONFIG_BOOTCHARTD is not set
  # CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
  # CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
-CONFIG_HALT=y
-CONFIG_POWEROFF=y
-CONFIG_REBOOT=y
+# CONFIG_HALT is not set
+# CONFIG_POWEROFF is not set
+# CONFIG_REBOOT is not set
  # CONFIG_FEATURE_CALL_TELINIT is not set
-CONFIG_TELINIT_PATH=""
+# CONFIG_TELINIT_PATH is not set
  # CONFIG_INIT is not set
  # CONFIG_LINUXRC is not set
  # CONFIG_FEATURE_USE_INITTAB is not set
  # CONFIG_FEATURE_KILL_REMOVED is not set
-CONFIG_FEATURE_KILL_DELAY=0
+# CONFIG_FEATURE_KILL_DELAY is not set
  # CONFIG_FEATURE_INIT_SCTTY is not set
  # CONFIG_FEATURE_INIT_SYSLOG is not set
  # CONFIG_FEATURE_INIT_QUIET is not set
  # CONFIG_FEATURE_INIT_COREDUMPS is not set
-CONFIG_INIT_TERMINAL_TYPE=""
+# CONFIG_INIT_TERMINAL_TYPE is not set
  # CONFIG_FEATURE_INIT_MODIFY_CMDLINE is not set
  
  #

diff --git a/meta/recipes-core/busybox/busybox/init.cfg 
b/meta/recipes-core/busybox/busybox/init.cfg
index 006d4c6..3c1fdd4 100644
--- a/meta/recipes-core/busybox/busybox/init.cfg
+++ b/meta/recipes-core/busybox/busybox/init.cfg
@@ -1,3 +1,8 @@
  CONFIG_INIT=y
  CONFIG_FEATURE_USE_INITTAB=y
-
+CONFIG_HALT=y
+CONFIG_POWEROFF=y
+CONFIG_REBOOT=y
+CONFIG_FEATURE_KILL_DELAY=0
+CONFIG_TELINIT_PATH=""
+CONFIG_INIT_TERMINAL_TYPE=""



--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] oe_syslog.py: fix for syslog-ng

2018-08-05 Thread ChenQi

On 08/04/2018 12:40 AM, Richard Purdie wrote:

On Fri, 2018-08-03 at 16:27 +0800, Chen Qi wrote:

When using syslog-ng as the syslog provider, oe_syslog test case
fails
because it cannot find the syslog daemon. This is because it greps
for
'syslogd' but syslog-ng's daemon is 'syslog-ng'. So fix the grep
command
to also consider syslog-ng.

Also, when the test case fails, what I get is:

AssertionError: 1 != 0 : No syslogd process; ps output:



This does not help user. The output is actually from the 'PS | GREP'
command.
And when the 'PS | GREP' command fails, the output is always empty.
So also
fix it to actually output the ps information. After the change, it
looks like:

AssertionError: 1 != 0 : No syslogd process; ps -ef output:
UIDPID  PPID  C STIME TTY  TIME CMD
root 1 0 28 07:35 ?00:00:19 /sbin/init
root 2 0  0 07:35 ?00:00:00 [kthreadd]
root 3 2  0 07:35 ?00:00:00 [kworker/0:0]

...

Signed-off-by: Chen Qi 
---
  meta/lib/oeqa/runtime/cases/oe_syslog.py | 7 ---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/oe_syslog.py
b/meta/lib/oeqa/runtime/cases/oe_syslog.py
index 935f10f..23abae3 100644
--- a/meta/lib/oeqa/runtime/cases/oe_syslog.py
+++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -10,9 +10,10 @@ class SyslogTest(OERuntimeTestCase):
  @OETestDepends(['ssh.SSHTest.test_ssh'])
  @OEHasPackage(["busybox-syslog", "sysklogd", "rsyslog", "syslog-
ng"])
  def test_syslog_running(self):
-cmd = '%s  | grep -i [s]yslogd' % self.tc.target_cmds['ps']
-status, output = self.target.run(cmd)
-msg = "No syslogd process; ps output: %s" % output
+cmd = '%s  | grep -iE "[s]yslogd|[s]yslog-ng"' %
self.tc.target_cmds['ps']
+status, _ = self.target.run(cmd)
+_, output = self.target.run(self.tc.target_cmds['ps'])
+msg = "No syslogd process; %s output:\n%s" %
(self.tc.target_cmds['ps'], output)
  self.assertEqual(status, 0, msg=msg)

Rather than getting the output of "ps" again if the test failed (which
may then be different), could we just get the output of ps and then
test for the presence of syslog using python, sharing the output of ps
if the match isn't found?

Cheers,

Richard


Yes, it is better. I'll send out V2.

Best Regards,
Chen Qi


--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for bash: libjpeg-turbo: add -fomit-frame-pointer to DEBUG_OPTIMIZATION for armv[45] with thumb enabled

2018-08-05 Thread Patchwork
== Series Details ==

Series: bash: libjpeg-turbo: add -fomit-frame-pointer to DEBUG_OPTIMIZATION for 
armv[45] with thumb enabled
Revision: 1
URL   : https://patchwork.openembedded.org/series/13388/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patchbash: libjpeg-turbo: add -fomit-frame-pointer to 
DEBUG_OPTIMIZATION for armv[45] with thumb enabled
 Issue Commit shortlog is too long [test_shortlog_length] 
  Suggested fixEdit shortlog so that it is 90 characters or less (currently 
99 characters)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] gcc-8: Upgrade to 8.2 release

2018-08-05 Thread Martin Jansa
bash's read.c: http://paste.ubuntu.com/p/TMD7Z4gKxK/
libjpeg-turbo's turbojpeg.c: http://paste.ubuntu.com/p/FsV7zXnKHq/

On Sun, Aug 5, 2018 at 9:59 PM Khem Raj  wrote:

>
>
> On 8/5/18 12:45 PM, Martin Jansa wrote:
> > Turned out to be related to -fno-omit-frame-pointer from DEBUG_BUILD
> > together with security_flags.inc together with thumb, I've sent a work
> > around which works for me:
> >
> http://lists.openembedded.org/pipermail/openembedded-core/2018-August/153741.html
> >
>
> thumb1 is kind of less tested ISA, so this workaround is perfectly fine.
> although it would be interesting to have the pre-processed file where it
> hangs
>
> > it's reproducible with gcc-8.1 as well, so it wasn't caused by gcc-8.2
> > upgrade (I've enabled security_flags.inc in qemuarm builds around the
> > same time).
> >
> > On Mon, Jul 30, 2018 at 8:35 PM Khem Raj  > > wrote:
> >
> > Sure my builds with gold did not end up in the fails for qemuarm and
> > thumb1 the setup is very similar but I might have been lucky let me
> > know how it goes
> >
> > On Mon, Jul 30, 2018 at 7:53 AM Martin Jansa  > > wrote:
> >
> > I'm not sure if it was caused by this change, but I've included
> > it from patchwork on Friday and since then I've seen 3 builds
> > getting stuck in gcc for 50 hours.
> >
> > In all 3 cases it was qemuarm (with thumb and gold enabled),
> > twice while building bash and once building libjpeg-turbo. I
> > will let you know after more builds to see how often it happens
> > (I didn't do many builds over weekend, because well - they were
> > stuck on early ones, because of this).
> >
> > On Fri, Jul 27, 2018 at 10:31 AM Khem Raj  > > wrote:
> >
> > Signed-off-by: Khem Raj  > >
> > ---
> >  ...003-build-failures-with-with-cpu-xsc.patch | 61
> > ---
> >  .../gcc/{gcc-8.1.inc => gcc-8.2.inc}  | 11 ++--
> >  ...0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch |  0
> >  .../0003-gcc-poison-system-directories.patch  |  0
> >  .../0004-gcc-poison-dir-extend.patch  |  0
> >  ...-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch |  0
> >  .../0006-64-bit-multilib-hack.patch   |  0
> >  .../0007-optional-libstdc.patch   |  0
> >  ...gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch |  0
> >  .../0009-COLLECT_GCC_OPTIONS.patch|  0
> >  ...ts.h-in-B-instead-of-S-and-t-oe-in-B.patch |  0
> >  .../0011-fortran-cross-compile-hack.patch |  0
> >  .../0012-cpp-honor-sysroot.patch  |  0
> >  .../0013-MIPS64-Default-to-N64-ABI.patch  |  0
> >  ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch |  0
> >  ...gcc-Fix-argument-list-too-long-error.patch |  0
> >  .../0016-Disable-sdt.patch|  0
> >  .../{gcc-8.1 => gcc-8.2}/0017-libtool.patch   |  0
> >  ...s-fix-v4bx-to-linker-to-support-EABI.patch |  0
> >  ...-config-files-from-B-instead-of-usin.patch |  0
> >  ...ir-from-.la-which-usually-points-to-.patch |  0
> >  .../0021-export-CPP.patch |  0
> >  ...ILIB_OSDIRNAMES-and-other-multilib-o.patch |  0
> >  ...e-target-gcc-headers-can-be-included.patch |  0
> >  ...ild-with-disable-dependency-tracking.patch |  0
> >  ...t-directory-during-relink-if-inst_pr.patch |  0
> >  ...IR-replacement-instead-of-hardcoding.patch |  0
> >  ...27-aarch64-Add-support-for-musl-ldso.patch |  0
> >  ...-fix-libcc1-s-install-path-and-rpath.patch |  0
> >  ...le-sysroot-support-for-nativesdk-gcc.patch |  0
> >  ...sroot-gcc-version-specific-dirs-with.patch |  0
> >  ...ous-_FOR_BUILD-and-related-variables.patch |  0
> >  ...032-nios2-Define-MUSL_DYNAMIC_LINKER.patch |  0
> >  ...d-to-link-commandline-for-musl-targe.patch |  0
> >  ...bgcc-Add-knob-to-use-ldbl-128-on-ppc.patch |  0
> >  ...using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch |  0
> >  ...as-for-__cpu_indicator_init-instead-.patch |  0
> >  .../0037-sync-gcc-stddef.h-with-musl.patch|  0
> >  ...-fault-in-precompiled-header-generat.patch |  0
> >  .../0039-Fix-for-testsuite-failure.patch  |  0
> >  ...Re-introduce-spe-commandline-options.patch |  0
> >  ...adian_8.1.bb  =>
> > gcc-cross-canadian_8.2.bb
> > } |  0
> >  ...nitial_8.1.bb  

Re: [OE-core] [PATCH] gcc-8: Upgrade to 8.2 release

2018-08-05 Thread Khem Raj


On 8/5/18 12:45 PM, Martin Jansa wrote:
> Turned out to be related to -fno-omit-frame-pointer from DEBUG_BUILD
> together with security_flags.inc together with thumb, I've sent a work
> around which works for me:
> http://lists.openembedded.org/pipermail/openembedded-core/2018-August/153741.html
> 

thumb1 is kind of less tested ISA, so this workaround is perfectly fine.
although it would be interesting to have the pre-processed file where it
hangs

> it's reproducible with gcc-8.1 as well, so it wasn't caused by gcc-8.2
> upgrade (I've enabled security_flags.inc in qemuarm builds around the
> same time).
> 
> On Mon, Jul 30, 2018 at 8:35 PM Khem Raj  > wrote:
> 
> Sure my builds with gold did not end up in the fails for qemuarm and
> thumb1 the setup is very similar but I might have been lucky let me
> know how it goes 
> 
> On Mon, Jul 30, 2018 at 7:53 AM Martin Jansa  > wrote:
> 
> I'm not sure if it was caused by this change, but I've included
> it from patchwork on Friday and since then I've seen 3 builds
> getting stuck in gcc for 50 hours.
> 
> In all 3 cases it was qemuarm (with thumb and gold enabled),
> twice while building bash and once building libjpeg-turbo. I
> will let you know after more builds to see how often it happens
> (I didn't do many builds over weekend, because well - they were
> stuck on early ones, because of this).
> 
> On Fri, Jul 27, 2018 at 10:31 AM Khem Raj  > wrote:
> 
> Signed-off-by: Khem Raj  >
> ---
>  ...003-build-failures-with-with-cpu-xsc.patch | 61
> ---
>  .../gcc/{gcc-8.1.inc => gcc-8.2.inc}          | 11 ++--
>  ...0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch |  0
>  .../0003-gcc-poison-system-directories.patch  |  0
>  .../0004-gcc-poison-dir-extend.patch          |  0
>  ...-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch |  0
>  .../0006-64-bit-multilib-hack.patch           |  0
>  .../0007-optional-libstdc.patch               |  0
>  ...gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch |  0
>  .../0009-COLLECT_GCC_OPTIONS.patch            |  0
>  ...ts.h-in-B-instead-of-S-and-t-oe-in-B.patch |  0
>  .../0011-fortran-cross-compile-hack.patch     |  0
>  .../0012-cpp-honor-sysroot.patch              |  0
>  .../0013-MIPS64-Default-to-N64-ABI.patch      |  0
>  ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch |  0
>  ...gcc-Fix-argument-list-too-long-error.patch |  0
>  .../0016-Disable-sdt.patch                    |  0
>  .../{gcc-8.1 => gcc-8.2}/0017-libtool.patch   |  0
>  ...s-fix-v4bx-to-linker-to-support-EABI.patch |  0
>  ...-config-files-from-B-instead-of-usin.patch |  0
>  ...ir-from-.la-which-usually-points-to-.patch |  0
>  .../0021-export-CPP.patch                     |  0
>  ...ILIB_OSDIRNAMES-and-other-multilib-o.patch |  0
>  ...e-target-gcc-headers-can-be-included.patch |  0
>  ...ild-with-disable-dependency-tracking.patch |  0
>  ...t-directory-during-relink-if-inst_pr.patch |  0
>  ...IR-replacement-instead-of-hardcoding.patch |  0
>  ...27-aarch64-Add-support-for-musl-ldso.patch |  0
>  ...-fix-libcc1-s-install-path-and-rpath.patch |  0
>  ...le-sysroot-support-for-nativesdk-gcc.patch |  0
>  ...sroot-gcc-version-specific-dirs-with.patch |  0
>  ...ous-_FOR_BUILD-and-related-variables.patch |  0
>  ...032-nios2-Define-MUSL_DYNAMIC_LINKER.patch |  0
>  ...d-to-link-commandline-for-musl-targe.patch |  0
>  ...bgcc-Add-knob-to-use-ldbl-128-on-ppc.patch |  0
>  ...using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch |  0
>  ...as-for-__cpu_indicator_init-instead-.patch |  0
>  .../0037-sync-gcc-stddef.h-with-musl.patch    |  0
>  ...-fault-in-precompiled-header-generat.patch |  0
>  .../0039-Fix-for-testsuite-failure.patch      |  0
>  ...Re-introduce-spe-commandline-options.patch |  0
>  ...adian_8.1.bb  =>
> gcc-cross-canadian_8.2.bb
> } |  0
>  ...nitial_8.1.bb  =>
> gcc-cross-initial_8.2.bb } |  0
>  .../{gcc-cross_8.1.bb  =>
> gcc-cross_8.2.bb }    |  0
>  ...ial_8.1.bb  =>
> gcc-crosssdk-initial_8.2.bb
> 

[OE-core] [PATCH V2] strace: Fix build with glibc 2.28

2018-08-05 Thread Khem Raj
Signed-off-by: Khem Raj 
---
v2: Backport an upstreamed patch to fix the same instead

 ...001-tests-fix-build-with-fresh-glibc.patch | 41 +++
 meta/recipes-devtools/strace/strace_4.23.bb   |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 
meta/recipes-devtools/strace/strace/0001-tests-fix-build-with-fresh-glibc.patch

diff --git 
a/meta/recipes-devtools/strace/strace/0001-tests-fix-build-with-fresh-glibc.patch
 
b/meta/recipes-devtools/strace/strace/0001-tests-fix-build-with-fresh-glibc.patch
new file mode 100644
index 00..020380ff31
--- /dev/null
+++ 
b/meta/recipes-devtools/strace/strace/0001-tests-fix-build-with-fresh-glibc.patch
@@ -0,0 +1,41 @@
+From bba1b0085f2a2c83839647fee48628ee054aceb7 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" 
+Date: Sun, 15 Jul 2018 22:14:29 +
+Subject: [PATCH] tests: fix build with fresh glibc
+
+Workaround additional incompatibility between  and
+ introduced by glibc-2.27.9000-566-gfd70af4.
+
+* tests/xstatx.c (statx, statx_timestamp): Redefine before the inclusion
+of  to avoid conflicts between definitions provided by the
+linux kernel headers and the GNU libc.
+---
+Upstream-Status: Backport [https://gitlab.com/strace/strace/commit/3dbffb7]
+Signed-off-by: Khem Raj 
+
+ tests/xstatx.c | 6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/tests/xstatx.c b/tests/xstatx.c
+index 7fb9326..441f4a8 100644
+--- a/tests/xstatx.c
 b/tests/xstatx.c
+@@ -64,10 +64,14 @@ typedef off_t libc_off_t;
+ 
+ # define stat libc_stat
+ # define stat64 libc_stat64
++# define statx libc_statx
++# define statx_timestamp libc_statx_timestamp
+ # include 
+ # include 
+-# undef stat
++# undef statx_timestamp
++# undef statx
+ # undef stat64
++# undef stat
+ 
+ # undef st_atime
+ # undef st_mtime
+-- 
+2.18.0
+
diff --git a/meta/recipes-devtools/strace/strace_4.23.bb 
b/meta/recipes-devtools/strace/strace_4.23.bb
index 0c159fc6f6..d30d440abc 100644
--- a/meta/recipes-devtools/strace/strace_4.23.bb
+++ b/meta/recipes-devtools/strace/strace_4.23.bb
@@ -14,6 +14,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
file://mips-SIGEMT.patch \
file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \

file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
+   file://0001-tests-fix-build-with-fresh-glibc.patch \
"
 SRC_URI[md5sum] = "fad4bba0947553cef34d46a9fd78f039"
 SRC_URI[sha256sum] = 
"7860a6965f1dd832747bd8281a04738274398d32c56e9fbd0a68b1bb9ec09aad"
-- 
2.18.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] gcc-8: Upgrade to 8.2 release

2018-08-05 Thread Martin Jansa
Turned out to be related to -fno-omit-frame-pointer from DEBUG_BUILD
together with security_flags.inc together with thumb, I've sent a work
around which works for me:
http://lists.openembedded.org/pipermail/openembedded-core/2018-August/153741.html

it's reproducible with gcc-8.1 as well, so it wasn't caused by gcc-8.2
upgrade (I've enabled security_flags.inc in qemuarm builds around the same
time).

On Mon, Jul 30, 2018 at 8:35 PM Khem Raj  wrote:

> Sure my builds with gold did not end up in the fails for qemuarm and
> thumb1 the setup is very similar but I might have been lucky let me know
> how it goes
>
> On Mon, Jul 30, 2018 at 7:53 AM Martin Jansa 
> wrote:
>
>> I'm not sure if it was caused by this change, but I've included it from
>> patchwork on Friday and since then I've seen 3 builds getting stuck in gcc
>> for 50 hours.
>>
>> In all 3 cases it was qemuarm (with thumb and gold enabled), twice while
>> building bash and once building libjpeg-turbo. I will let you know after
>> more builds to see how often it happens (I didn't do many builds over
>> weekend, because well - they were stuck on early ones, because of this).
>>
>> On Fri, Jul 27, 2018 at 10:31 AM Khem Raj  wrote:
>>
>>> Signed-off-by: Khem Raj 
>>> ---
>>>  ...003-build-failures-with-with-cpu-xsc.patch | 61 ---
>>>  .../gcc/{gcc-8.1.inc => gcc-8.2.inc}  | 11 ++--
>>>  ...0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch |  0
>>>  .../0003-gcc-poison-system-directories.patch  |  0
>>>  .../0004-gcc-poison-dir-extend.patch  |  0
>>>  ...-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch |  0
>>>  .../0006-64-bit-multilib-hack.patch   |  0
>>>  .../0007-optional-libstdc.patch   |  0
>>>  ...gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch |  0
>>>  .../0009-COLLECT_GCC_OPTIONS.patch|  0
>>>  ...ts.h-in-B-instead-of-S-and-t-oe-in-B.patch |  0
>>>  .../0011-fortran-cross-compile-hack.patch |  0
>>>  .../0012-cpp-honor-sysroot.patch  |  0
>>>  .../0013-MIPS64-Default-to-N64-ABI.patch  |  0
>>>  ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch |  0
>>>  ...gcc-Fix-argument-list-too-long-error.patch |  0
>>>  .../0016-Disable-sdt.patch|  0
>>>  .../{gcc-8.1 => gcc-8.2}/0017-libtool.patch   |  0
>>>  ...s-fix-v4bx-to-linker-to-support-EABI.patch |  0
>>>  ...-config-files-from-B-instead-of-usin.patch |  0
>>>  ...ir-from-.la-which-usually-points-to-.patch |  0
>>>  .../0021-export-CPP.patch |  0
>>>  ...ILIB_OSDIRNAMES-and-other-multilib-o.patch |  0
>>>  ...e-target-gcc-headers-can-be-included.patch |  0
>>>  ...ild-with-disable-dependency-tracking.patch |  0
>>>  ...t-directory-during-relink-if-inst_pr.patch |  0
>>>  ...IR-replacement-instead-of-hardcoding.patch |  0
>>>  ...27-aarch64-Add-support-for-musl-ldso.patch |  0
>>>  ...-fix-libcc1-s-install-path-and-rpath.patch |  0
>>>  ...le-sysroot-support-for-nativesdk-gcc.patch |  0
>>>  ...sroot-gcc-version-specific-dirs-with.patch |  0
>>>  ...ous-_FOR_BUILD-and-related-variables.patch |  0
>>>  ...032-nios2-Define-MUSL_DYNAMIC_LINKER.patch |  0
>>>  ...d-to-link-commandline-for-musl-targe.patch |  0
>>>  ...bgcc-Add-knob-to-use-ldbl-128-on-ppc.patch |  0
>>>  ...using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch |  0
>>>  ...as-for-__cpu_indicator_init-instead-.patch |  0
>>>  .../0037-sync-gcc-stddef.h-with-musl.patch|  0
>>>  ...-fault-in-precompiled-header-generat.patch |  0
>>>  .../0039-Fix-for-testsuite-failure.patch  |  0
>>>  ...Re-introduce-spe-commandline-options.patch |  0
>>>  ...adian_8.1.bb => gcc-cross-canadian_8.2.bb} |  0
>>>  ...nitial_8.1.bb => gcc-cross-initial_8.2.bb} |  0
>>>  .../{gcc-cross_8.1.bb => gcc-cross_8.2.bb}|  0
>>>  ...ial_8.1.bb => gcc-crosssdk-initial_8.2.bb} |  0
>>>  ...cc-crosssdk_8.1.bb => gcc-crosssdk_8.2.bb} |  0
>>>  ...{gcc-runtime_8.1.bb => gcc-runtime_8.2.bb} |  0
>>>  ...anitizers_8.1.bb => gcc-sanitizers_8.2.bb} |  0
>>>  .../{gcc-source_8.1.bb => gcc-source_8.2.bb}  |  0
>>>  .../gcc/{gcc_8.1.bb => gcc_8.2.bb}|  0
>>>  ...c-initial_8.1.bb => libgcc-initial_8.2.bb} |  0
>>>  .../gcc/{libgcc_8.1.bb => libgcc_8.2.bb}  |  0
>>>  ...{libgfortran_8.1.bb => libgfortran_8.2.bb} |  0
>>>  53 files changed, 5 insertions(+), 67 deletions(-)
>>>  delete mode 100644
>>> meta/recipes-devtools/gcc/gcc-8.1/0041-arm-PR-target-86003-build-failures-with-with-cpu-xsc.patch
>>>  rename meta/recipes-devtools/gcc/{gcc-8.1.inc => gcc-8.2.inc} (93%)
>>>  rename meta/recipes-devtools/gcc/{gcc-8.1 =>
>>> gcc-8.2}/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch (100%)
>>>  rename meta/recipes-devtools/gcc/{gcc-8.1 =>
>>> gcc-8.2}/0003-gcc-poison-system-directories.patch (100%)
>>>  rename meta/recipes-devtools/gcc/{gcc-8.1 =>
>>> gcc-8.2}/0004-gcc-poison-dir-extend.patch (100%)
>>>  rename meta/recipes-devtools/gcc/{gcc-8.1 =>
>>> gcc-8.2}/0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch (100%)
>>>  rename meta/recipes-devtools/gcc/{gcc-8.1 =>
>>> 

[OE-core] [PATCH] classes/sanity: Clean up getstatusoutput usage

2018-08-05 Thread Joshua Watt
Replace usage of oe.utils.getstatusoutput() with direct subprocess
calls.

Signed-off-by: Joshua Watt 
---
 meta/classes/sanity.bbclass | 67 +
 1 file changed, 38 insertions(+), 29 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index e0e57ceec1f..4e8eae8946d 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -336,11 +336,11 @@ def check_path_length(filepath, pathname, limit):
 return ""
 
 def get_filesystem_id(path):
-status, result = oe.utils.getstatusoutput("stat -f -c '%s' '%s'" % ("%t", 
path))
-if status == 0:
-return result
-else:
-bb.warn("Can't get the filesystem id of: %s" % path)
+import subprocess
+try:
+return subprocess.check_output(["stat", "-f", "-c", "%t", 
path]).decode('utf-8')
+except subprocess.CalledProcessError:
+bb.warn("Can't get filesystem id of: %s" % path)
 return None
 
 # Check that the path isn't located on nfs.
@@ -463,7 +463,7 @@ def check_patch_version(sanity_data):
 import re, subprocess
 
 try:
-result = subprocess.check_output(["patch", "--version"], 
stderr=subprocess.STDOUT, universal_newlines=True)
+result = subprocess.check_output(["patch", "--version"], 
stderr=subprocess.STDOUT).decode('utf-8')
 version = re.search(r"[0-9.]+", result.splitlines()[0]).group()
 if LooseVersion(version) < LooseVersion("2.7"):
 return "Your version of patch is older than 2.7 and has bugs which 
will break builds. Please install a newer version of patch.\n"
@@ -476,9 +476,12 @@ def check_patch_version(sanity_data):
 # Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to 
validate.
 def check_make_version(sanity_data):
 from distutils.version import LooseVersion
-status, result = oe.utils.getstatusoutput("make --version")
-if status != 0:
-return "Unable to execute make --version, exit code %d\n" % status
+import subprocess
+
+try:
+result = subprocess.check_output(['make', '--version'], 
stderr=subprocess.STDOUT).decode('utf-8')
+except subprocess.CalledProcessError as e:
+return "Unable to execute make --version, exit code %d\n%s\n" % 
(e.returncode, e.output)
 version = result.split()[2]
 if LooseVersion(version) == LooseVersion("3.82"):
 # Construct a test file
@@ -493,18 +496,18 @@ def check_make_version(sanity_data):
 f.close()
 
 # Check if make 3.82 has been patched
-status,result = oe.utils.getstatusoutput("make -f makefile_test")
-
-os.remove("makefile_test")
-if os.path.exists("makefile_test_a.c"):
-os.remove("makefile_test_a.c")
-if os.path.exists("makefile_test_b.c"):
-os.remove("makefile_test_b.c")
-if os.path.exists("makefile_test.a"):
-os.remove("makefile_test.a")
-
-if status != 0:
+try:
+subprocess.check_call(['make', '-f', 'makefile_test'])
+except subprocess.CalledProcessError as e:
 return "Your version of make 3.82 is broken. Please revert to 3.81 
or install a patched version.\n"
+finally:
+os.remove("makefile_test")
+if os.path.exists("makefile_test_a.c"):
+os.remove("makefile_test_a.c")
+if os.path.exists("makefile_test_b.c"):
+os.remove("makefile_test_b.c")
+if os.path.exists("makefile_test.a"):
+os.remove("makefile_test.a")
 return None
 
 
@@ -512,9 +515,11 @@ def check_make_version(sanity_data):
 # but earlier versions do not; this needs to work properly for sstate
 def check_tar_version(sanity_data):
 from distutils.version import LooseVersion
-status, result = oe.utils.getstatusoutput("tar --version")
-if status != 0:
-return "Unable to execute tar --version, exit code %d\n" % status
+import subprocess
+try:
+result = subprocess.check_output(["tar", "--version"], 
stderr=subprocess.STDOUT).decode('utf-8')
+except subprocess.CalledProcessError as e:
+return "Unable to execute tar --version, exit code %d\n%s\n" % 
(e.returncode, e.output)
 version = result.split()[3]
 if LooseVersion(version) < LooseVersion("1.24"):
 return "Your version of tar is older than 1.24 and has bugs which will 
break builds. Please install a newer version of tar.\n"
@@ -525,9 +530,11 @@ def check_tar_version(sanity_data):
 # The git fetcher also had workarounds for git < 1.7.9.2 which we've dropped
 def check_git_version(sanity_data):
 from distutils.version import LooseVersion
-status, result = oe.utils.getstatusoutput("git --version 2> /dev/null")
-if status != 0:
-return "Unable to execute git --version, exit code %d\n" % status
+import subprocess
+try:
+result = subprocess.check_output(["git", "--version"], 

[OE-core] [PATCH] bash: libjpeg-turbo: add -fomit-frame-pointer to DEBUG_OPTIMIZATION for armv[45] with thumb enabled

2018-08-05 Thread Martin Jansa
with thumb and debug enabled bash and libjpeg-turbo gets stuck forever
when building for qemuarm.

bash gets stuck in:
bash/4.4.18-r0/build/builtins$ arm-webos-linux-gnueabi-gcc  -march=armv5te 
-mthumb -fstack-protector-strong   --sysroot=bash/4.4.18-r0/recipe-sysroot -c  
-DHAVE_CONFIG_H -DSHELL  -I. -I..  -I../../bash-4.4.18 
-I../../bash-4.4.18/include -I../../bash-4.4.18/lib 
-I../../bash-4.4.18/builtins-O -fno-omit-frame-pointer -g 
-DNON_INTERACTIVE_LOGIN_SHELLS read.c
libjpeg-turbo gets stuck in:
libjpeg-turbo/1_1.5.3-r0/build$ arm-webos-linux-gnueabi-gcc -march=armv5te 
-mthumb -fstack-protector-strong -Wformat -Wformat-security 
-Werror=format-security --sysroot=libjpeg-turbo/1_1.5.3-r0/recipe-sysroot 
-DHAVE_CONFIG_H -I. -I../libjpeg-turbo-1.5.3 -Wall -O -fno-omit-frame-pointer 
-g -feliminate-unused-debug-types -pipe -c ../libjpeg-turbo-1.5.3/turbojpeg.c  
-fPIC -DPIC -o .libs/libturbojpeg_la-turbojpeg.o

when -mthumb, -fstack-protector-strong, -fno-omit-frame-pointer appear
together, removing one of them is enough for successful build.

similar to:
http://lists.openembedded.org/pipermail/openembedded-core/2018-May/150654.html
but in this case the build gets stuck instead of failure

Signed-off-by: Martin Jansa 
---
 meta/recipes-extended/bash/bash_4.4.18.bb | 3 +++
 meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/meta/recipes-extended/bash/bash_4.4.18.bb 
b/meta/recipes-extended/bash/bash_4.4.18.bb
index 0b22ca7a69..b338acd9dc 100644
--- a/meta/recipes-extended/bash/bash_4.4.18.bb
+++ b/meta/recipes-extended/bash/bash_4.4.18.bb
@@ -19,4 +19,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
 SRC_URI[tarball.md5sum] = "518e2c187cc11a17040f0915dddce54e"
 SRC_URI[tarball.sha256sum] = 
"604d9eec5e4ed5fd2180ee44dd756ddca92e0b6aa4217bbab2b6227380317f23"
 
+DEBUG_OPTIMIZATION_append_armv4 = " ${@bb.utils.contains('TUNE_CCARGS', 
'-mthumb', '-fomit-frame-pointer', '', d)}"
+DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', 
'-mthumb', '-fomit-frame-pointer', '', d)}"
+
 BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb 
b/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
index c453fdd9e0..9e1bc0e34d 100644
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
@@ -41,6 +41,9 @@ EXTRA_OECONF_append_class-target = " 
${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf
 EXTRA_OECONF_append_class-target_powerpc = " 
${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
 EXTRA_OECONF_append_class-target_powerpc64 = " 
${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
 
+DEBUG_OPTIMIZATION_append_armv4 = " ${@bb.utils.contains('TUNE_CCARGS', 
'-mthumb', '-fomit-frame-pointer', '', d)}"
+DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', 
'-mthumb', '-fomit-frame-pointer', '', d)}"
+
 def get_build_time(d):
 if d.getVar('SOURCE_DATE_EPOCH') != None:
 import datetime
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 08/10] strace: Fix build with glibc 2.28

2018-08-05 Thread Khem Raj
On Sun, Aug 5, 2018 at 2:50 AM Max Krummenacher  wrote:
>
> Hi
>
> Am Samstag, den 04.08.2018, 19:07 -0700 schrieb Khem Raj:
> > Signed-off-by: Khem Raj 
> > ---
> >  .../0001-tests-Include-linux-stat.h.patch | 76 +++
> >  meta/recipes-devtools/strace/strace_4.23.bb   |  1 +
> >  2 files changed, 77 insertions(+)
> >  create mode 100644 
> > meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch
> >
> > diff --git 
> > a/meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch
> > b/meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch
> > new file mode 100644
> > index 00..cbb9c60de7
> > --- /dev/null
> > +++ 
> > b/meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch
> > @@ -0,0 +1,76 @@
> > +From 264889246fcdd486867e8ca923094afa1689126c Mon Sep 17 00:00:00 2001
> > +From: Khem Raj 
> > +Date: Sat, 4 Aug 2018 13:18:03 -0700
> > +Subject: [PATCH] tests: Include linux/stat.h
> > +
> > +Starting with glibc 2.28, sys/stat.h header will have the
> > +definition for struct statx, in which case including  linux/stat.h should 
> > be
> > +avoided, in order to prevent a duplicate definition.
> > +
> > +Signed-off-by: Khem Raj 
> > +---
> > +Upstream-Status: Submitted 
> > [https://lists.strace.io/pipermail/strace-devel/2018-August/008329.htm
> > l]
> > + tests-m32/statx.c  | 7 +++
> > + tests-mx32/statx.c | 8 +++-
> > + tests/statx.c  | 8 +++-
> > + 3 files changed, 21 insertions(+), 2 deletions(-)
> > +
> > +diff --git a/tests-m32/statx.c b/tests-m32/statx.c
> > +index 816b7eb..7364a02 100644
> > +--- a/tests-m32/statx.c
> >  b/tests-m32/statx.c
> > +@@ -30,6 +30,13 @@
> > +
> > + #ifdef __NR_statx
> > +
> > ++# if defined(__GLIBC__)
> > ++#  if !__GLIBC_PREREQ(2,28)
> > ++#   include 
> > ++#  endif
> > ++# else
> > ++#  include 
> > ++# endif
> > + # include 
>
> Shouldn't the unconditional include be removed?
>

yes.

> Max
>
> > + # include "xlat.h"
> > + # include "xlat/statx_masks.h"
> > +diff --git a/tests-mx32/statx.c b/tests-mx32/statx.c
> > +index 816b7eb..e9f9993 100644
> > +--- a/tests-mx32/statx.c
> >  b/tests-mx32/statx.c
> > +@@ -30,7 +30,13 @@
> > +
> > + #ifdef __NR_statx
> > +
> > +-# include 
> > ++# if defined(__GLIBC__)
> > ++#  if !__GLIBC_PREREQ(2,28)
> > ++#   include 
> > ++#  endif
> > ++# else
> > ++#  include 
> > ++# endif
> > + # include "xlat.h"
> > + # include "xlat/statx_masks.h"
> > + # include "xlat/statx_attrs.h"
> > +diff --git a/tests/statx.c b/tests/statx.c
> > +index 816b7eb..e9f9993 100644
> > +--- a/tests/statx.c
> >  b/tests/statx.c
> > +@@ -30,7 +30,13 @@
> > +
> > + #ifdef __NR_statx
> > +
> > +-# include 
> > ++# if defined(__GLIBC__)
> > ++#  if !__GLIBC_PREREQ(2,28)
> > ++#   include 
> > ++#  endif
> > ++# else
> > ++#  include 
> > ++# endif
> > + # include "xlat.h"
> > + # include "xlat/statx_masks.h"
> > + # include "xlat/statx_attrs.h"
> > +--
> > +2.18.0
> > +
> > diff --git a/meta/recipes-devtools/strace/strace_4.23.bb b/meta/recipes-
> > devtools/strace/strace_4.23.bb
> > index 0c159fc6f6..d966a77b89 100644
> > --- a/meta/recipes-devtools/strace/strace_4.23.bb
> > +++ b/meta/recipes-devtools/strace/strace_4.23.bb
> > @@ -14,6 +14,7 @@ SRC_URI = 
> > "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
> > file://mips-SIGEMT.patch \
> > file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
> > 
> > file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
> > +   file://0001-tests-Include-linux-stat.h.patch \
> > "
> >  SRC_URI[md5sum] = "fad4bba0947553cef34d46a9fd78f039"
> >  SRC_URI[sha256sum] = 
> > "7860a6965f1dd832747bd8281a04738274398d32c56e9fbd0a68b1bb9ec09aad"
> > --
> > 2.18.0
> >
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for "context.py: Do not mask except..." and 3 more

2018-08-05 Thread Patchwork
== Series Details ==

Series: "context.py: Do not mask except..." and 3 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/13387/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Series sent to the wrong mailing list or some patches from 
the series correspond to different mailing lists [test_target_mailing_list] 
  Suggested fixSend the series again to the correct mailing list (ML)
  Suggested ML yo...@yoctoproject.org 
[http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/]
  Patch's path:documentation/dev-manual/dev-manual-common-tasks.xml

* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at 1c4d9f46d5)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/4] testimage: target.start exceptions not masked.

2018-08-05 Thread Paulo Neves
Previously the target.start exceptions were being
masked by the catch clause of RuntimeError and
BlockingIOError which are very broad. We decoupled
the start method try clause from the runTests try
clause which requires catching the BlockingIOError and
RuntimeError.

Signed-off-by: Paulo Neves 
---
 meta/classes/testimage.bbclass | 36 +---
 1 file changed, 21 insertions(+), 15 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 1b33f72..8e42294 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -264,24 +264,30 @@ def testimage_main(d):
 # Add systemd.log_level=debug to enable systemd debug logging
 bootparams = 'systemd.log_target=console'
 
+
 tc.target.deploy()
-results = None
-orig_sigterm_handler = signal.signal(signal.SIGTERM, sigterm_exception)
+
+#We do not want the runTests to mask exeptions of target.start but we want 
a failed start
+#to trigger a stop.
 try:
-# We need to check if runqemu ends unexpectedly
-# or if the worker send us a SIGTERM
-tc.target.start(extra_bootparams=bootparams)
-results = tc.runTests()
-except (RuntimeError, BlockingIOError) as err:
-if isinstance(err, RuntimeError):
-bb.error('testimage received SIGTERM, shutting down...')
-else:
-bb.error('runqemu failed, shutting down...')
-if results:
-results.stop()
-results = None
+tc.target.start(extra_bootparams=bootparams) 
+results = None
+orig_sigterm_handler = signal.signal(signal.SIGTERM, sigterm_exception)
+try:
+# We need to check if runqemu ends unexpectedly
+# or if the worker send us a SIGTERM
+results = tc.runTests()
+except (RuntimeError, BlockingIOError) as err:
+if isinstance(err, RuntimeError):
+bb.error('testimage received SIGTERM, shutting down...')
+else:
+bb.error('runqemu failed, shutting down...')
+if results:
+results.stop()
+results = None
+finally:
+signal.signal(signal.SIGTERM, orig_sigterm_handler)
 finally:
-signal.signal(signal.SIGTERM, orig_sigterm_handler)
 tc.target.stop()
 
 # Show results (if we have them)
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 4/4] masterimage: Check for rootfs path instead of file.

2018-08-05 Thread Paulo Neves
The rootfs might be a directory path or a file path. A
case in point is if the test wants to deploy a rootfs
directly by rsyncing it to the target or even use it
as part of a tftp server.

Signed-off-by: Paulo Neves 
---
 meta/lib/oeqa/controllers/masterimage.py | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta/lib/oeqa/controllers/masterimage.py 
b/meta/lib/oeqa/controllers/masterimage.py
index 26e3870..fb8ab50 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -51,11 +51,7 @@ class 
MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
 self.image_fstype = self.get_image_fstype(td)
 self.rootfs = os.path.join(td['DEPLOY_DIR_IMAGE'], 
td['IMAGE_LINK_NAME'] + '.' + self.image_fstype)
 self.kernel = os.path.join(td['DEPLOY_DIR_IMAGE'], 
td["KERNEL_IMAGETYPE"] + '-' + td['MACHINE'] + '.bin')
-if not os.path.isfile(self.rootfs):
-# we could've checked that IMAGE_FSTYPES contains tar.gz but the 
config for running testimage might not be
-# the same as the config with which the image was build, ie
-# you bitbake core-image-sato with IMAGE_FSTYPES += "tar.gz"
-# and your autobuilder overwrites the config, adds the test bits 
and runs bitbake core-image-sato -c testimage
+if not os.path.exists(self.rootfs):
 bb.fatal("No rootfs found. Did you build the image ?\n"  \
   "If yes, did you build it with IMAGE_FSTYPES += \"{}\" ?"  \
   "\nExpected path: {}".format(" 
".join(self.supported_image_fstypes), self.rootfs))
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/4] testimage: Refactoring and fixing.

2018-08-05 Thread Paulo Neves
The testimage.bbclass invocation of controllers besides
simpletarget and qemutarget was broken.
Setting TEST_TARGET to
class names did not work, only hardcoded values set in context.py were allowed.
On the other hand the other TEST_TARGETs available were
supposedly available through the class name convetion but
none of them were working. See:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=12842

In this commit qemuwrapper and simpletarget TEST_TARGETS are now
not available through these names, but through the common
convention of class names.

The code for layer defined controllers was outdated and broken
because the example controllers in meta-yocto-bsp as well as
the controllers available in masterimage were dependent only
on the datastore d being available for __init__ contruction, when
the testimage.bbclass and context.py, which initialize
test controllers never passed the datastore. This commit fixes
all the controllers to not use the datastore, but the testdata
json file that is loaded by the testimage.bbclass. This way
the tests can still be exported to be ran outside bitbake. The
kwargs and logger is still passed in the constructor and there
maybe some redundancies between the kwargs and the td test
datstore, but this is not addressed in this commit.

In masterimage.py there was a duplicate SystemdbootTarget which
was removed. It is my opinion that all targets should go to
meta-yocto-bsp or meta/ and should not get special treatment whether they come
from poky or other layer.

There was a functionality that was lost in masterimage about
retrieving a fresh BB_ORIGENV. The test data json file does not
store this, so the build-time enviromental variables cannot
be retrieved later on, when running the tests.

The deploy() method invocation of the test cases was removed in
the refactoring and this commit re-adds it in the same logical
place. The deploy method was added as an abstract method so that
all Test controller classes have this method. This method had been
lost and was not used in the simpleremote and qemuwrapper, because
these controllers do not need the functionality, but almost any
real board requires certain steps to deploy the new images, before
the tests can be ran. An example of this need was visible in the
master image and subclasses in meta-yocto-bsp.

A dependency on images fstypes of qemu was removed from testimage.
The allowed file system types were not relevant for other controllers,
and made it so that there was an import of the OEQemuTarget python
class applicable to all possible controllers, including non qemu.

The manual was changed wherever I saw it was appropriate but,
some improvements may still be needed.

The SimpleRemoteTarget, OEQemuTarget and a custom controller,
developed according to the manual were successfully tested.

Signed-off-by: Paulo Neves 
---
 .../dev-manual/dev-manual-common-tasks.xml |   8 +-
 documentation/ref-manual/ref-variables.xml |  19 +---
 .../lib/oeqa/controllers/beaglebonetarget.py   |   6 +-
 .../lib/oeqa/controllers/edgeroutertarget.py   |   6 +-
 meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py  |   4 +-
 meta/classes/testimage.bbclass |  18 +---
 meta/lib/oeqa/controllers/masterimage.py   | 107 ++---
 .../target/qemu.py => controllers/qemutarget.py}   |  30 --
 meta/lib/oeqa/controllers/simpleremote.py  |  33 +++
 .../target/ssh.py => controllers/sshtarget.py} |   9 +-
 meta/lib/oeqa/core/target/__init__.py  |   4 +
 meta/lib/oeqa/runtime/context.py   |  32 +-
 meta/lib/oeqa/targetcontrol.py |  97 ++-
 13 files changed, 153 insertions(+), 220 deletions(-)
 rename meta/lib/oeqa/{core/target/qemu.py => controllers/qemutarget.py} (58%)
 create mode 100644 meta/lib/oeqa/controllers/simpleremote.py
 rename meta/lib/oeqa/{core/target/ssh.py => controllers/sshtarget.py} (98%)

diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml 
b/documentation/dev-manual/dev-manual-common-tasks.xml
index fe1bfba..95aa533 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -11400,7 +11400,7 @@
 within a separately started QEMU or any
 other virtual machine manager.
 
-
"Systemd-bootTarget":
+
"SystemdbootTarget":
 Choose "Systemd-bootTarget" if your hardware is
 an EFI-based machine with
 systemd-boot as bootloader and
@@ -11459,10 +11459,10 @@
 
 
 
-Selecting Systemd-bootTarget
+Selecting SystemdbootTarget
 
 
-If you did not set TEST_TARGET to
+If you did not set TEST_TARG
 

[OE-core] [PATCH 1/4] context.py: Do not mask exceptions needlessly.

2018-08-05 Thread Paulo Neves
There were a lot of assumptions in the controller import
code of context.py which were not true anymore.  These
assumptions reflected themselves by catching exceptions and
re-raising them with unhelpful error messages in other parts
of the code.

This commit does not fix the classes controller classes that
became broken after the refactor but at least it allows for
the exceptions to be thrown where the imports fail, thus
actually showing what exactly went wrong with the import.

An example of such an improvement is that before if the
controller class failed during it's init contructor the
controller would just be skipped and the task would just
complain it could not find the controller.  Now for example,
if there is a NamerError due to a variable not being
declared, the user will get that report.

Signed-off-by: Paulo Neves 
---
 meta/lib/oeqa/runtime/context.py | 14 --
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index 0294003..a7f3823 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -112,12 +112,9 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 # XXX: Don't base your targets on this code it will be refactored
 # in the near future.
 # Custom target module loading
-try:
-target_modules_path = kwargs.get('target_modules_path', '')
-controller = 
OERuntimeTestContextExecutor.getControllerModule(target_type, 
target_modules_path)
-target = controller(logger, target_ip, server_ip, **kwargs)
-except ImportError as e:
-raise TypeError("Failed to import %s from available controller 
modules" % target_type)
+target_modules_path = kwargs.get('target_modules_path', '')
+controller = 
OERuntimeTestContextExecutor.getControllerModule(target_type, 
target_modules_path)
+target = controller(logger, target_ip, server_ip, **kwargs)
 
 return target
 
@@ -173,10 +170,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 def _loadControllerFromModule(target, modulename):
 obj = None
 # import module, allowing it to raise import exception
-try:
-module = __import__(modulename, globals(), locals(), [target])
-except Exception as e:
-return obj
+module = __import__(modulename, globals(), locals(), [target])
 # look for target class in the module, catching any exceptions as it
 # is valid that a module may not have the target class.
 try:
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 08/10] strace: Fix build with glibc 2.28

2018-08-05 Thread Max Krummenacher
Hi

Am Samstag, den 04.08.2018, 19:07 -0700 schrieb Khem Raj:
> Signed-off-by: Khem Raj 
> ---
>  .../0001-tests-Include-linux-stat.h.patch | 76 +++
>  meta/recipes-devtools/strace/strace_4.23.bb   |  1 +
>  2 files changed, 77 insertions(+)
>  create mode 100644 
> meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch
> 
> diff --git 
> a/meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch
> b/meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch
> new file mode 100644
> index 00..cbb9c60de7
> --- /dev/null
> +++ 
> b/meta/recipes-devtools/strace/strace/0001-tests-Include-linux-stat.h.patch
> @@ -0,0 +1,76 @@
> +From 264889246fcdd486867e8ca923094afa1689126c Mon Sep 17 00:00:00 2001
> +From: Khem Raj 
> +Date: Sat, 4 Aug 2018 13:18:03 -0700
> +Subject: [PATCH] tests: Include linux/stat.h
> +
> +Starting with glibc 2.28, sys/stat.h header will have the
> +definition for struct statx, in which case including  linux/stat.h should be
> +avoided, in order to prevent a duplicate definition.
> +
> +Signed-off-by: Khem Raj 
> +---
> +Upstream-Status: Submitted 
> [https://lists.strace.io/pipermail/strace-devel/2018-August/008329.htm
> l]
> + tests-m32/statx.c  | 7 +++
> + tests-mx32/statx.c | 8 +++-
> + tests/statx.c  | 8 +++-
> + 3 files changed, 21 insertions(+), 2 deletions(-)
> +
> +diff --git a/tests-m32/statx.c b/tests-m32/statx.c
> +index 816b7eb..7364a02 100644
> +--- a/tests-m32/statx.c
>  b/tests-m32/statx.c
> +@@ -30,6 +30,13 @@
> + 
> + #ifdef __NR_statx
> + 
> ++# if defined(__GLIBC__)
> ++#  if !__GLIBC_PREREQ(2,28)
> ++#   include 
> ++#  endif
> ++# else
> ++#  include 
> ++# endif
> + # include 

Shouldn't the unconditional include be removed?

Max

> + # include "xlat.h"
> + # include "xlat/statx_masks.h"
> +diff --git a/tests-mx32/statx.c b/tests-mx32/statx.c
> +index 816b7eb..e9f9993 100644
> +--- a/tests-mx32/statx.c
>  b/tests-mx32/statx.c
> +@@ -30,7 +30,13 @@
> + 
> + #ifdef __NR_statx
> + 
> +-# include 
> ++# if defined(__GLIBC__)
> ++#  if !__GLIBC_PREREQ(2,28)
> ++#   include 
> ++#  endif
> ++# else
> ++#  include 
> ++# endif
> + # include "xlat.h"
> + # include "xlat/statx_masks.h"
> + # include "xlat/statx_attrs.h"
> +diff --git a/tests/statx.c b/tests/statx.c
> +index 816b7eb..e9f9993 100644
> +--- a/tests/statx.c
>  b/tests/statx.c
> +@@ -30,7 +30,13 @@
> + 
> + #ifdef __NR_statx
> + 
> +-# include 
> ++# if defined(__GLIBC__)
> ++#  if !__GLIBC_PREREQ(2,28)
> ++#   include 
> ++#  endif
> ++# else
> ++#  include 
> ++# endif
> + # include "xlat.h"
> + # include "xlat/statx_masks.h"
> + # include "xlat/statx_attrs.h"
> +-- 
> +2.18.0
> +
> diff --git a/meta/recipes-devtools/strace/strace_4.23.bb b/meta/recipes-
> devtools/strace/strace_4.23.bb
> index 0c159fc6f6..d966a77b89 100644
> --- a/meta/recipes-devtools/strace/strace_4.23.bb
> +++ b/meta/recipes-devtools/strace/strace_4.23.bb
> @@ -14,6 +14,7 @@ SRC_URI = 
> "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
> file://mips-SIGEMT.patch \
> file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
> 
> file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
> +   file://0001-tests-Include-linux-stat.h.patch \
> "
>  SRC_URI[md5sum] = "fad4bba0947553cef34d46a9fd78f039"
>  SRC_URI[sha256sum] = 
> "7860a6965f1dd832747bd8281a04738274398d32c56e9fbd0a68b1bb9ec09aad"
> -- 
> 2.18.0
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core