[OE-core] ✗ patchtest: failure for linux-libc-headers: Fix build failure by using fixed input and output files instead of pipe

2018-12-24 Thread Patchwork
== Series Details ==

Series: linux-libc-headers: Fix build failure by using fixed input and output 
files instead of pipe
Revision: 1
URL   : https://patchwork.openembedded.org/series/15461/
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:



* Patchlinux-libc-headers: Fix build failure by using fixed input 
and output files instead of pipe
 Issue Commit shortlog is too long [test_shortlog_length] 
  Suggested fixEdit shortlog so that it is 90 characters or less (currently 
91 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


[OE-core] [PATCH] linux-libc-headers: Fix build failure by using fixed input and output files instead of pipe

2018-12-24 Thread He Zhe
This is an amendment for
2322dc4 "linux-libc-headers: Fix build failure by using fixed temporary file 
instead of pipe"
which moves just the temporary input file from /tmp to build directory. But the
build directory may not in the same file system with the output file,
/dev/null, either and thus make it possible to trigger that bug, 67f846b, in
binutil v2.31.

This patch puts both the input and output files into build directory for good.

Signed-off-by: He Zhe 
---
 ...fixed-input-and-output-files-instead-of-.patch} | 22 ++
 .../linux-libc-headers/linux-libc-headers_4.18.bb  |  2 +-
 2 files changed, 11 insertions(+), 13 deletions(-)
 rename 
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/{0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
 => 0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch} (83%)

diff --git 
a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch
similarity index 83%
rename from 
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
rename to 
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch
index 0d8fa80939..9ba1c076e8 100644
--- 
a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch
+++ 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch
@@ -1,7 +1,7 @@
-From 3bbea65e11918f8753e8006a2198b999cdb0af58 Mon Sep 17 00:00:00 2001
+From 694eba7bb974f6b8bd308804cb24350150108b2b Mon Sep 17 00:00:00 2001
 From: He Zhe 
 Date: Wed, 21 Nov 2018 15:12:43 +0800
-Subject: [PATCH] scripts: Use fixed temporary file instead of pipe for
+Subject: [PATCH] scripts: Use fixed input and output files instead of pipe for
  here-doc
 
 There was a bug of "as" in binutils that when it checks if the input file and
@@ -40,31 +40,29 @@ Upstream-Status: Inappropriate [A work around for binutils 
v2.31]
 
 Signed-off-by: He Zhe 
 ---
- scripts/gcc-goto.sh | 7 ++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
+ scripts/gcc-goto.sh | 5 -
+ 1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh
-index 083c526..0aaf1b4 100755
+index 083c526..8dfac55 100755
 --- a/scripts/gcc-goto.sh
 +++ b/scripts/gcc-goto.sh
-@@ -3,7 +3,9 @@
+@@ -3,7 +3,7 @@
  # Test for gcc 'asm goto' support
  # Copyright (C) 2010, Jason Baron 
  
 -cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
-+TMPFILE=`mktemp -p .`
-+
-+cat << "END" > ${TMPFILE}
++cat << "END" > ./input
  int main(void)
  {
  #if defined(__arm__) || defined(__aarch64__)
-@@ -20,3 +22,6 @@ entry:
+@@ -20,3 +20,6 @@ entry:
return 0;
  }
  END
 +
-+$@ -x c ${TMPFILE} -c -o /dev/null && echo "y"
-+rm ${TMPFILE}
++$@ -x c ./input -c -o ./output && echo "y"
++rm ./input ./output
 -- 
 2.7.4
 
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
index 00420aa6f7..229a0027d7 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb
@@ -10,7 +10,7 @@ SRC_URI_append_libc-musl = "\
"
 
 SRC_URI_append = "\
-file://0001-scripts-Use-fixed-temporary-file-instead-of-pipe-for.patch \
+file://0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch \
 "
 
 SRC_URI[md5sum] = "bee5fe53ee1c3142b8f0c12c0d3348f9"
-- 
2.11.0

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


[OE-core] [PATCH] binutils: Upgrade to latest on 2.31 release branch

2018-12-24 Thread Khem Raj
* Append minor version to PV so recipe checker is happy
* Drop upstreamed patches
* Remove changelog from CVE patches, they dont apply and are in patch
  log anyway

Signed-off-by: Khem Raj 
---
 .../binutils/binutils-2.31.inc|   8 +-
 ...-for-input-file-matching-output-file.patch |  59 -
 ...ion-where-GOT-information-is-collect.patch | 201 --
 ...ess.-Return-FALSE-in-case-of-NULL-po.patch |  38 
 ...-symbol-is-not-an-indirect-or-warnin.patch |  46 
 ...was-still-being-generated-when-symbo.patch |  40 
 .../binutils/binutils/CVE-2018-17358.patch|  37 +---
 .../binutils/binutils/CVE-2018-17360.patch|  24 +--
 .../binutils/binutils/CVE-2018-18309.patch|  87 ++--
 .../binutils/binutils/CVE-2018-18605.patch|  20 +-
 .../binutils/binutils/CVE-2018-18606.patch|  22 +-
 .../binutils/binutils/CVE-2018-18607.patch|  25 +--
 .../binutils/binutils/clang-bfd-fix.patch |   8 +-
 13 files changed, 33 insertions(+), 582 deletions(-)
 delete mode 100644 
meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch
 delete mode 100644 
meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch
 delete mode 100644 
meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch
 delete mode 100644 
meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch
 delete mode 100644 
meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch

diff --git a/meta/recipes-devtools/binutils/binutils-2.31.inc 
b/meta/recipes-devtools/binutils/binutils-2.31.inc
index c3c15fb416..b8b2d97884 100644
--- a/meta/recipes-devtools/binutils/binutils-2.31.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.31.inc
@@ -15,10 +15,11 @@ def binutils_branch_version(d):
 return pvsplit[0] + "_" + pvsplit[1]
 
 BINUPV = "${@binutils_branch_version(d)}"
+PV .= ".1"
 
 UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P\d+_(\d_?)*)"
 
-SRCREV ?= "4568e49ff799192fea4f66063fe13e2b871ec75a"
+SRCREV ?= "c909e7afdc4710851a53e86ebed8cea3879b26e5"
 BINUTILS_GIT_URI ?= 
"git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git"
 SRC_URI = "\
  ${BINUTILS_GIT_URI} \
@@ -36,11 +37,6 @@ SRC_URI = "\
  file://0014-Detect-64-bit-MIPS-targets.patch \
  file://0015-sync-with-OE-libtool-changes.patch \
  file://0016-add-i386pep-emulation-for-x86_64.patch \
- file://0017-improve-check-for-input-file-matching-output-file.patch \
- file://0018-Refactored-location-where-GOT-information-is-collect.patch \
- file://0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch \
- file://0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch \
- file://0021-PLT-information-was-still-being-generated-when-symbo.patch \
  file://clang-bfd-fix.patch \
  file://CVE-2018-17358.patch \
  file://CVE-2018-17360.patch \
diff --git 
a/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch
 
b/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch
deleted file mode 100644
index 265e52633b..00
--- 
a/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 2a50366ded329bfb39d387253450c9d5302c3503 Mon Sep 17 00:00:00 2001
-From: Robert Yang 
-Date: Tue, 14 Aug 2018 12:22:35 +0100
-Subject: [PATCH] as.c: Improve check for input file matching output file.
-
-When the assembler reports that the input and output are the same, report the
-file names involved, in order to help debugging.  Also do not equate two files
-are the same if the have the same inode value but reside on different file
-systems.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang 

- gas/as.c  | 27 ---
- 2 files changed, 20 insertions(+), 7 deletions(-)
-
-diff --git a/gas/as.c b/gas/as.c
-index b2a908a..3105d06 100644
 a/gas/as.c
-+++ b/gas/as.c
-@@ -1259,14 +1259,27 @@ main (int argc, char ** argv)
-   {
- struct stat sib;
- 
--if (stat (argv[i], ) == 0)
-+/* Check that the input file and output file are different.  */
-+if (stat (argv[i], ) == 0
-+&& sib.st_ino == sob.st_ino
-+/* POSIX emulating systems may support stat() but if the
-+   underlying file system does not support a file serial number
-+   of some kind then they will return 0 for the inode.  So
-+   two files with an inode of 0 may not actually be the same.
-+   On real POSIX systems no ordinary file will ever have an
-+   inode of 0.  */
-+&& sib.st_ino != 0
-+/* Different files may have the same inode number if they
-+ 

Re: [OE-core] [thud][PATCH v2] createrepo-c: Fix setup of logging (log domains)

2018-12-24 Thread Zheng, Ruoqin
Hi Ross

This patch is just for thud.

--
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
   Nanjing, 210012, China
MAIL : zhengrq.f...@cn.fujistu.com

> -Original Message-
> From: Burton, Ross [mailto:ross.bur...@intel.com]
> Sent: Friday, December 21, 2018 10:04 PM
> To: Zheng, Ruoqin/郑 若钦 
> Cc: OE-core 
> Subject: Re: [OE-core] [thud][PATCH v2] createrepo-c: Fix setup of logging 
> (log
> domains)
> 
> On Fri, 21 Dec 2018 at 09:19, Zheng, Ruoqin  
> wrote:
> > Well, createrepo-c 0.12 has fixed this bug, and will this upgrade be merged 
> > to
> thud branch?
> 
> The upgrade won't be merged unless its critical, so please submit your patch 
> for
> thud.
> 
> Ross
> 



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


[OE-core] ✗ patchtest: failure for "scripts/test-case-mgmt: store ..." and 1 more

2018-12-24 Thread Patchwork
== Series Details ==

Series: "scripts/test-case-mgmt: store ..." and 1 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/15457/
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:



* Patch[2/2] script/lib/testcasemgmt/manualexecution.py : manual 
helper script with bare-minimum function
 Issue Commit shortlog is too long [test_shortlog_length] 
  Suggested fixEdit shortlog so that it is 90 characters or less (currently 
92 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


[OE-core] [PATCH 2/2] script/lib/testcasemgmt/manualexecution.py : manual helper script with bare-minimum function

2018-12-24 Thread Yeoh Ee Peng
From: Mazliana 

Manual execution script is a helper script to execute all manual test cases in 
baseline command,
which consists of user guideline steps and the expected results. The last step 
will ask user to
provide their input to execute result. The input options are 
passed/failed/blocked/skipped status.
The result given will be written in testresults.json including log error from 
the user input
and configuration if there is any. The output test result for json file is 
created by using
OEQA library.
 
The configuration part is manually key-in by the user. The system allow user to 
specify how many
configuration they want to add and they need to define the required 
configuration name and value
pair. In QA perspective, "configuration" means the test environments and 
parameters used during
QA setup before testing can be carry out. Example of configurations: image used 
for boot up, host
machine distro used, poky configurations, etc.
 
The purpose of adding the configuration is to standardize the output test 
result format between
automation and manual execution.

scripts/test-case-mgmt: add "manualexecution" as a tool

Integrated the test-case-mgmt "store", "report" with "manual execution".Manual 
test execution
is one of an alternative test case management tool of Testopia. This script has 
only a
bare-minimum function. Bare-minimum function refer to function where the user 
can only execute all of the
test cases that component have.

To use these scripts, first source oe environment, then run the entry point
script to look for help.
$ test-case-mgmt

To execute manual test cases, execute the below
$ test-case-mgmt manualexecution 

By default testresults.json store in /tmp/log/manual

[YOCTO #12651]

Signed-off-by: Mazliana 
---
 scripts/lib/testcasemgmt/manualexecution.py | 142 
 scripts/test-case-mgmt  |  11 ++-
 2 files changed, 152 insertions(+), 1 deletion(-)
 create mode 100644 scripts/lib/testcasemgmt/manualexecution.py

diff --git a/scripts/lib/testcasemgmt/manualexecution.py 
b/scripts/lib/testcasemgmt/manualexecution.py
new file mode 100644
index 000..c6c450f
--- /dev/null
+++ b/scripts/lib/testcasemgmt/manualexecution.py
@@ -0,0 +1,142 @@
+# test case management tool - manual execution from testopia test cases
+#
+# Copyright (c) 2018, Intel Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+import argparse
+import json
+import os
+import sys
+import datetime
+import re
+from oeqa.core.runner import OETestResultJSONHelper
+
+class ManualTestRunner(object):
+def __init__(self):
+self.jdata = ''
+self.test_module = ''
+self.test_suite = ''
+self.test_case = ''
+self.configuration = ''
+self.starttime = ''
+self.result_id = ''
+self.write_dir = ''
+
+def _read_json(self, file):
+self.jdata = json.load(open('%s' % file))
+self.test_case = []
+self.test_module = self.jdata[0]['test']['@alias'].split('.', 2)[0]
+self.test_suite = self.jdata[0]['test']['@alias'].split('.', 2)[1]
+for i in range(0, len(self.jdata)):
+self.test_case.append(self.jdata[i]['test']['@alias'].split('.', 
2)[2])
+
+def _get_input(self, config):
+while True:
+output = input('{} = '.format(config))
+if re.match('^[a-zA-Z0-9_]+$', output):
+break
+print('Only alphanumeric and underscore are allowed. Please try 
again')
+return output
+
+def _create_config(self):
+self.configuration = {}
+while True:
+try:
+conf_total = int(input('\nPlease provide how many 
configuration you want to save \n'))
+break
+except ValueError:
+print('Invalid input. Please provide input as a number not 
character.')
+for i in range(conf_total):
+print('-')
+print('This is configuration #%s ' % (i + 1) + '. Please provide 
configuration name and its value')
+print('-')
+name_conf = self._get_input('Configuration Name')
+value_conf = self._get_input('Configuration Value')
+print('-\n')
+self.configuration[name_conf.upper()] = value_conf
+current_datetime = datetime.datetime.now()
+self.starttime = current_datetime.strftime('%Y%m%d%H%M%S')
+

[OE-core] [PATCH 1/2] scripts/test-case-mgmt: store test result and reporting

2018-12-24 Thread Yeoh Ee Peng
These scripts were developed as an alternative test case management
tool to Testopia. Using these scripts, user can manage the
testresults.json files generated by oeqa automated tests. Using the
"store" operation, user can store multiple testresults.json files
under different directories (eg. categorize directory by
selftest-, runtime--). Then, using the
"report" operation, user can view the test result summary
for all available testresults.json files being stored that
were grouped by directory and test configuration.

The "report" operation expect the testresults.json file to use the
json format below. OEQA implemented the codes to create test result
in this format.
{
"": {
"configuration": {
"": "",
"": "",
...
"": "",
},
"result": {
"": {
"status": "",
"log": ""
},
"": {
"status": "",
"log": ""
},
...
"": {
"status": "",
"log": ""
},
}
},
...
"": {
"configuration": {
"": "",
"": "",
...
"": "",
},
"result": {
"": {
"status": "",
"log": ""
},
"": {
"status": "",
"log": ""
},
...
"": {
"status": "",
"log": ""
},
}
},
}

This scripts depends on scripts/oe-git-archive where it was
facing error if gitpython package not installed. Refer to
[YOCTO# 13082] for more detail.

To use these scripts, first source oe environment, then run the
entry point script to look for help.
$ test-case-mgmt

To store test result from oeqa automated tests, execute the below
$ test-case-mgmt store  

To store test result from oeqa automated tests under a custom
directory, execute the below
$ test-case-mgmt store   -s 

To report test result summary, execute the below
$ test-case-mgmt report 

Signed-off-by: Yeoh Ee Peng 
---
 scripts/lib/testcasemgmt/__init__.py   |   0
 scripts/lib/testcasemgmt/gitstore.py   | 175 +
 scripts/lib/testcasemgmt/report.py | 136 
 scripts/lib/testcasemgmt/store.py  |  40 +
 .../template/test_report_full_text.txt |  33 
 scripts/test-case-mgmt |  96 +++
 6 files changed, 480 insertions(+)
 create mode 100644 scripts/lib/testcasemgmt/__init__.py
 create mode 100644 scripts/lib/testcasemgmt/gitstore.py
 create mode 100644 scripts/lib/testcasemgmt/report.py
 create mode 100644 scripts/lib/testcasemgmt/store.py
 create mode 100644 scripts/lib/testcasemgmt/template/test_report_full_text.txt
 create mode 100755 scripts/test-case-mgmt

diff --git a/scripts/lib/testcasemgmt/__init__.py 
b/scripts/lib/testcasemgmt/__init__.py
new file mode 100644
index 000..e69de29
diff --git a/scripts/lib/testcasemgmt/gitstore.py 
b/scripts/lib/testcasemgmt/gitstore.py
new file mode 100644
index 000..0acb50e
--- /dev/null
+++ b/scripts/lib/testcasemgmt/gitstore.py
@@ -0,0 +1,175 @@
+# test case management tool - store test result & log to git repository
+#
+# Copyright (c) 2018, Intel Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+import tempfile
+import os
+import subprocess
+import shutil
+import scriptpath
+scriptpath.add_bitbake_lib_path()
+scriptpath.add_oe_lib_path()
+from oeqa.utils.git import GitRepo, GitError
+#from oe.path import copytree, ignore_patterns
+
+class GitStore(object):
+
+def __init__(self, git_dir, git_branch):
+self.git_dir = git_dir
+self.git_branch = git_branch
+
+def _git_init(self):
+return GitRepo(self.git_dir, is_topdir=True)
+
+def _run_git_cmd(self, repo, cmd):
+try:
+output = repo.run_cmd(cmd)
+return True, output
+except GitError:
+return False, None
+
+def check_if_git_dir_exist(self, logger):
+if not os.path.exists('%s/.git' % self.git_dir):
+logger.debug('Could not find destination git directory: %s' % 
self.git_dir)
+return False
+logger.debug('Found destination git directory: %s' % self.git_dir)
+return True
+
+def checkout_git_dir(self, logger):
+repo = self._git_init()
+cmd = 'checkout %s' % self.git_branch
+