diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-08-20 16:16:51 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-08-20 16:17:54 +0300 |
commit | 08902b01500fb82ac050ec2dce9b6c4358075a17 (patch) | |
tree | 76dad89580e2a758feb672731745c5f4c0f6ef30 /poky/meta/recipes-support/ptest-runner | |
parent | 754b8faf0be432fcdcacb340fe95117cac890e40 (diff) | |
download | openbmc-08902b01500fb82ac050ec2dce9b6c4358075a17.tar.xz |
poky: subtree update:835f7eac06..20946c63c2
Aaron Chan (1):
python3-dbus: Add native and nativesdk variants
Adrian Bunk (8):
gnome: Remove the gnome class
bind: Remove RECIPE_NO_UPDATE_REASON and follow the ESV releases
webkitgtk: Reenable on mips
mtd-utils: Upgrade to 2.1.1
Change ftp:// URIs to http(s)://
webkitgtk: Stop disabling gold on aarch64 and mips
grub/libmpc/gdb: Use GNU_MIRROR in more recipes
screen: Backport fix for an implicit function declaration
Alexander Kanavin (28):
btrfs-tools: update 5.1.1 -> 5.2.1
libmodulemd: update to 2.6.0
libwebp: upgrade 1.0.2 -> 1.0.3
createrepo-c: upgrade 0.14.2 -> 0.14.3
webkitgtk: upgrade 2.24.2 -> 2.24.3
bzip2: fix upstream version check
stress-ng: add a recipe that replaces the original stress
meson: update 0.50.1 -> 0.51.1
meson.bbclass: do not pass native compiler/linker flags via command line
meson: add a backported patch to address vala cross-compilation errors
libedit: fix upstream verison check
maintainers.inc: assign acpica to Ross
stress-ng: add a patch to remove unneeded bash dependency
elfutils: use PRIVATE_LIBS for the ptest package
apt: add a missing perl runtime dependency
attr: add a missing perl runtime dependency
ofono: correct the python3 runtime dependency
bluez5: correct the python3 runtime dependency
local.conf.sample: do not add sdl to nativesdk qemu config
maintainers.inc: give python recipes to Oleksandr Kravchuk
python-numpy: remove the python 2.x version of the recipe
python-scons: remove the python 2.x version of the recipe
python-nose: remove the python 2.x version of the recipe
lib/oeqa/utils/qemurunner.py: add runqemuparams after kvm/nographic/snapshot/slirp
mesa: enable glx-tls option in native and nativesdk builds
insane.bbclass: in file-rdeps do not look into RDEPENDS recursively
sudo: correct SRC_URI
ovmf: fix upstream version check
Andreas Obergschwandtner (1):
bzip2: set the autoconf package version to the recipe version
Anuj Mittal (11):
mpg123: upgrade 1.25.10 -> 1.25.11
libsdl: remove
pulseaudio: don't include consolekit when systemd is enabled
libsdl2: upgrade 2.0.9 -> 2.0.10
grub: upgrade 2.02 -> 2.04
patch: fix CVE-2019-13636
python: fix CVE-2018-20852
python: CVE-2019-9947 is same as CVE-2019-9740
libtasn1: upgrade 4.13 -> 4.14
pango: upgrade 1.42.4 -> 1.44.3
harfbuzz: upgrade 2.4.0 -> 2.5.3
Bartosz Golaszewski (1):
qemu: add a patch fixing the native build on newer kernels
Bedel, Alban (3):
rng-tools: start rngd early in the boot process again
kernel-uboot: remove useless special casing of arm64 Image
boost: Fix build and enable context and coroutines on aarch64
Bruce Ashfield (2):
linux-yocto/4.19: update to v4.19.61
linux-yocto-dev: bump to 5.3-rcX
Changqing Li (6):
runqemu: add lockfile for port used when slirp enabled
runqemu: fix get portlock fail for multi users
qemuboot-x86: move QB_SYSTEM_NAME to corresponding conf
genericx86-64.conf/genericx86.conf: add QB_SYSTEM_NAME
grub/grub-efi: fix conflict for aach64
go-runtime: remove conflict files from -dev packages
Chen Qi (1):
sudo: use nonarch_libdir instead of libdir for tmpfiles.d
Chin Huat Ang (1):
cve-update-db-native: fix https proxy issues
Chris Laplante via bitbake-devel (1):
bitbake: fetch2/wget: avoid 'maximum recursion depth' RuntimeErrors when handling 403 codes
Daniel Ammann (2):
image_types: Remove remnants of hdddirect
bitbake: toaster: Sync list of fs_types with oe-core
Denys Dmytriyenko (2):
wayland-protocols: upgrade 1.17 -> 1.18
weston: upgrade 6.0.0 -> 6.0.1
Diego Rondini (1):
image_types.bbclass: make gzipped images rsyncable
Dmitry Eremin-Solenikov (1):
kernel.bbclass: fix installation of modules signing certificates
Frederic Ouellet (1):
systemd: Add partial support of drop-in configuration files to systemd-systemctl-native
Hongxu Jia (1):
grub: add grub-native
Jason Wessel (6):
sqlite3: Fix zlib determinism problem
pseudo: Fix openat() with a symlink pointing to a directory
image_types_wic.bbclass: Copy the .wks and .env files to deploy image dir
wic: Add partition type for msdos partition tables
wic: Make disk partition size consistently computed
dpkg: Provide update-alternative for start-stop-daemon
Johann Fridriksson (1):
ruby: Adding zlib-native to native dependencies
Joshua Lock via Openembedded-core (3):
sstate: fix log message
classes/sstate: don't use unsigned sstate when verification enabled
classes/sstate: regenerate sstate when signing enabled
Joshua Watt (1):
bitbake: hashserv: SQL Optimizations
Kai Kang (3):
subversion: add packageconfig boost
epiphany: set imcompatible with tune mips
e2fsprogs: 1.44.5 -> 1.45.3
Khem Raj (23):
strace: Upgrade to 5.2
linux-libc-header: Fix ptrace.h and prctl.h conflict on aarch64
libnss-nis: Fix build with glibc 2.30
lttng-ust: Check for gettid libc API
ltp: Fix build with glibc 2.30
lttng-tools: Fix build with glibc 2.30
xserver-xorg: Backport patch to remove using sys/io.h
Apache-2.0-with-LLVM-exception: Add new license file
libedit: Move from meta-oe
groff: Fix math.h inclusion from system headers issue
webkitgtk: Fix compile failures with clang
glibc: Update to glibc 2.30
virglrender: Fix endianness check on musl
syslinux: Override hardcoded toolnames in Makefile
systemd-boot: Add option to specify cross objcopy and use it
mesa,llvm,meson: Update llvm to 8.0.1 plus define and use LLVM version globally
musl: Update to master tip
oeqa/buildgalculator.py: Add dependency on gtk+3
oeqa/parselogs: grep for exact errors list keywords
gcc-runtime: Move content from gcclibdir into libdir
gdb: Do not set musl specific CFLAGS
linuxloader: Add entries for riscv64
musl: Delete GLIBC_LDSO before creating symlink with lnr
Luca Boccassi (1):
python3-pygobject: remove python3-setuptools from RDEPENDS
Mads Andreasen (1):
bitbake: fetch2/npm: Use npm pack to download node modules instead of wget
Mark Hatle (2):
glibc-package.inc: Add linux-libc-headers-dev to glibc-dev
bitbake: layerindexlib: Fix parsing of recursive layer dependencies
Martin Jansa (3):
icecc.bbclass: catch subprocess.CalledProcessError
powertop: import a fix from buildroot
meson: backport fix for builds with -Werror=return-type
Ming Liu (5):
libx11-compose-data: add recipe
libxkbcommon: RDEPENDS on libx11 compose data
weston: change to use meson build system
license_image.bbclass: drop invalid comments
opensbi: handle deploy task under sstate
Naveen Saini (2):
gdk-pixbuf: enable x11 PACKAGECONFIG option
image_types_wic: add syslinux-native dependency conditional
Oleksandr Kravchuk (17):
python3-pip: update to 19.2.1
python3-git: update to 2.1.12
ethtool: update to 5.2
python3-git: update to 2.1.13
xorgproto: update to 2019.1
xserver-xorg: update to 1.20.5
ell: update to 0.21
libinput: update to 1.14.0
wpa-supplicant: update to 2.9
aspell: update to 0.60.7
linux-firmware: add PE back
xf86-input-libinput: update to 0.29.0
git: update to 2.22.1
xrandr: update to 1.5.1
python3-git: update to 3.0.0
librepo: update to 1.10.5
libevent: update to 2.1.11
Pascal Bach (2):
cmake: 3.14.5 -> 3.15.1
cmake: 3.15.1 -> 3.15.2
Paul Eggleton (2):
scripts/create-pull-request: improve handling of non-SSH remote URLs
scripts/create-pull-request: fix putting subject containing / into cover letter
Piotr Tworek (2):
pulseaudio: Backport upstream fix new alsa compatibility.
libdrm: Move amdgpu.ids file into libdrm-amdgpu package.
Randy MacLeod (1):
ptest-runner: update from 2.3.1 to 2.3.2
Rasmus Villemoes (1):
iproute2: drop pointless configure-cross.patch
Ricardo Neri (5):
ovmf: Update to version edk2-stable201905
ovmf: Set PV
ovmf: Use HOSTTOOLS' python3
ovmf: Generate test Platform key and first Key Exchange Key
runqemu: Add support to handle EnrollDefaultKeys PK/KEK1 certificate
Ricardo Ribalda Delgado (2):
packagegroup-core-base-utils: Make it machine specific
inetutils: Fix abort on invalid files
Richard Purdie (50):
package: Improve determinism
sstate: Reduce race windows
bitbake: siggen: Import unihash code from OE-Core
bitbake: cache: Add SimpleCache class
bitbake: runqueue: Improve scenequeue processing logic
bitbake: siggen: Add new unitaskhashes data variable which is cached
bitbake: siggen: Convert to use self.unitaskhashes
bitbake: runqueue: Enable dynamic task adjustment to hash equivalency
bitbake: runqueue: Improve determinism
bitbake: cooker/hashserv: Allow autostarting of a local hash server using BB_HASHSERVE
bitbake: hashserv: Turn off sqlite synchronous mode
bitbake: prserv: Use a memory journal
bitbake: hashserv: Use separate threads for answering requests and handling them
bitbake: hashserv: Switch from threads to multiprocessing
bitbake: runqueue: Clean up BB_HASHCHECK_FUNCTION API
bitbake: siggen: Clean up task reference formats
bitbake: build/utils: Drop bb.build.FuncFailed
bitbake: tests/runqueue: Add hashserv+runqueue test
bitbake: bitbake: Bump version to 1.43.1 for API changes
sanity.conf: Require bitbake 1.43.1
classes/lib: Remove bb.build.FuncFailed
sstatesig: Move unihash siggen code to bitbake
sstatesig: Add debug for incorrect hash server settings
sstatesig: Adpat to recent bitbake hash equiv runqueue changes
sstatesig: Update to handle BB_HASHSERVE
sstate/sstatesig: Update to new form of BB_HASHCHECK_FUNCTION
sstatesig: Updates to match bitbake siggen changes
gstreamer: Add fix for glibc 2.30
sstatesig: Fix leftover splitting issue from siggen change
python3-pygobject: Add missing pkgutil RDEPENDS
bitbake: runqueue: Fix corruption issue
bitbake: runqueue: Improve setscene task handling logic
bitbake: tests/runqueue: Add further hash equivalence tests
bitbake: cooker: Improve hash server startup code to avoid exit tracebacks
bitbake: runqueue: Wait for covered tasks to complete before trying setscene
bitbake: runqueue: Fix next_buildable_task performance problem
bitbake: runqueue: Improve scenequeue debugging
bitbake: runqueue: Recompute holdoff tasks from scratch
bitbake: runqueue: Fix event timing race
bitbake: runqueue: Drop debug statement causing performance issues
bitbake: runqueue: Add further debug information
bitbake: runqueue: Add missing setscene task corner case
bitbake: runqueue: Ensure we clear the stamp cache
poky: Retire opensuse 42.3 from SANITY_TESTED_DISTROS
gcc-cross-canadian: Drop obsolete shlibs exclusion
bitbake: tests/runqueue: Fix tests
bitbake: runqueue: Fix data corruption problem
bitbake: runqueue: Ensure data is handled correctly
bitbake: hashserv: Ensure we don't accumulate sockets in TIME_WAIT state
bitbake: runqueue: Ensure target_tids is filtered
Robert Yang (3):
bitbake: cooker: Cleanup the queue before call process.join()
bitbake: knotty: Fix for the Second Keyboard Interrupt
bitbake: bitbake: server/process: Handle BBHandledException to avoid unexpected exceptions
Ross Burton (23):
libidn2: remove build paths from libidn2.pc
gnutls: don't use HOSTTOOLS_DIR/bash as a shell on target
libical: upgrade to 3.0.5
perl: fix whitespace
perl: add PACKAGECONFIG for db
fortran-helloworld: neaten recipe
python3: remove empty python3-distutils-staticdev
python3: support recommends in manifest
python3: split out the Windows distutils installer stubs
insane: check if the recipe incorrectly uses DEPENDS_${PN}
libxx86misc: remove this now redundant library
xserver-xorg: clean up xorgproto dependencies
xserver-xorg: add PACKAGECONFIG for DGA
xdpyinfo: don't depend on DGA
libxx86dga: remove obsolete client libary
xserver-xorg: remove embedded build path in the source
libx11: update to 1.6.8
sanity: update for new bb.build.exec_func() behaviour
libx11-diet: remove
qemu: fix patch Upstream-Status
xserver-xorg: refresh build path removal patch
waffle: upgrade 1.5.2 -> 1.6.0
libx11: replace libtool patch with upstreamed patch
Tim Blechmann (1):
deb: allow custom dpkg command
Trevor Gamblin (2):
gzip: update ptest package dependencies
patch: fix CVE-2019-13638
Wenlin Kang (1):
db: add switch for building database verification
Will Page (1):
uboot: fixes to uboot-extlinux-config attribute values
William Bourque (1):
meta/lib/oeqa: Remove ext4 for bootimg-biosplusefi
Yi Zhao (1):
libx11-compose-data: upgrade 1.6.7 -> 1.6.8
Yuan Chao (4):
glib-2.0:upgrade 2.60.5 -> 2.60.6
nettle:upgrade 3.4.1 -> 3.5.1
python3-pbr:upgrade 5.4.1 -> 5.4.2
gpgme:upgrade 1.13.0 -> 1.13.1
Zang Ruochen (8):
msmtp: upgrade 1.8.4 -> 1.8.5
curl: upgrade 7.65.2 -> 7.65.3
iso-codes: upgrade 4.2 -> 4.3
python-scons:upgrade 3.0.5 -> 3.1.0
libgudev:upgrade 232 -> 233
libglu:upgrade 9.0.0 -> 9.0.1
man-db:upgrade 2.8.5 -> 2.8.6.1
libnewt:upgrade 0.52.20 -> 0.52.21
Zheng Ruoqin (1):
python3-mako: 1.0.14 -> 1.1.0
Zoltan Kuscsik (1):
kmscube: update to latest revision
Change-Id: I2cd1a0d59da46725b1aba5a79b63eb6121b3c79e
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-support/ptest-runner')
-rw-r--r-- | poky/meta/recipes-support/ptest-runner/ptest-runner/0001-utils-Ensure-stdout-stderr-are-flushed.patch | 45 | ||||
-rw-r--r-- | poky/meta/recipes-support/ptest-runner/ptest-runner/0002-use-process-groups-when-spawning.patch | 35 | ||||
-rw-r--r-- | poky/meta/recipes-support/ptest-runner/ptest-runner/0003-utils-Ensure-pipes-are-read-after-exit.patch | 76 | ||||
-rw-r--r-- | poky/meta/recipes-support/ptest-runner/ptest-runner/0004-utils-ensure-child-can-be-session-leader.patch | 212 | ||||
-rw-r--r-- | poky/meta/recipes-support/ptest-runner/ptest-runner_2.3.2.bb (renamed from poky/meta/recipes-support/ptest-runner/ptest-runner_2.3.1.bb) | 8 |
5 files changed, 2 insertions, 374 deletions
diff --git a/poky/meta/recipes-support/ptest-runner/ptest-runner/0001-utils-Ensure-stdout-stderr-are-flushed.patch b/poky/meta/recipes-support/ptest-runner/ptest-runner/0001-utils-Ensure-stdout-stderr-are-flushed.patch deleted file mode 100644 index c9a9dd7cf4..0000000000 --- a/poky/meta/recipes-support/ptest-runner/ptest-runner/0001-utils-Ensure-stdout-stderr-are-flushed.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 9b36993794c1de733c521b2477370c874c07b617 Mon Sep 17 00:00:00 2001 -From: Richard Purdie <richard.purdie@linuxfoundation.org> -Date: Thu, 4 Apr 2019 14:18:55 +0100 -Subject: [PATCH 1/3] utils: Ensure stdout/stderr are flushed - -There is no guarantee that the data written with fwrite will be flushed to the -buffer. If stdout and stderr are the same thing, this could lead to interleaved -writes. The common case is stdout output so flush the output pipes when writing to -stderr. Also flush stdout before the function returns. - -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> -Upstream-Status: Pending [code being tested] ---- - utils.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/utils.c b/utils.c -index 504df0b..3ceb342 100644 ---- a/utils.c -+++ b/utils.c -@@ -295,8 +295,11 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid, - } - - if (pfds[1].revents != 0) { -- while ((n = read(fds[1], buf, WAIT_CHILD_BUF_MAX_SIZE)) > 0) -+ while ((n = read(fds[1], buf, WAIT_CHILD_BUF_MAX_SIZE)) > 0) { -+ fflush(fps[0]); - fwrite(buf, n, 1, fps[1]); -+ fflush(fps[1]); -+ } - } - - clock_gettime(clock, &sentinel); -@@ -315,7 +318,7 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid, - break; - } - -- -+ fflush(fps[0]); - return status; - } - --- -2.17.1 - diff --git a/poky/meta/recipes-support/ptest-runner/ptest-runner/0002-use-process-groups-when-spawning.patch b/poky/meta/recipes-support/ptest-runner/ptest-runner/0002-use-process-groups-when-spawning.patch deleted file mode 100644 index 5436a3340c..0000000000 --- a/poky/meta/recipes-support/ptest-runner/ptest-runner/0002-use-process-groups-when-spawning.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f0c42a65633341ad048718c7a6dbd035818e9eaf Mon Sep 17 00:00:00 2001 -From: Richard Purdie <richard.purdie@linuxfoundation.org> -Date: Thu, 4 Apr 2019 14:20:31 +0100 -Subject: [PATCH 2/3] use process groups when spawning - -Rather than just killing the process we've swawned, set the process group -for spawned children and then kill the group of processes. - -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> -Upstream-Status: Pending [code being tested] ---- - utils.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/utils.c b/utils.c -index 3ceb342..c5b3b8d 100644 ---- a/utils.c -+++ b/utils.c -@@ -309,7 +309,7 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid, - clock_gettime(clock, &time); - if ((time.tv_sec - sentinel.tv_sec) > timeout) { - *timeouted = 1; -- kill(pid, SIGKILL); -+ kill(-pid, SIGKILL); - waitflags = 0; - } - } -@@ -371,6 +371,7 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, - rc = -1; - break; - } else if (child == 0) { -+ setsid(); - run_child(p->run_ptest, pipefd_stdout[1], pipefd_stderr[1]); - } else { - int status; diff --git a/poky/meta/recipes-support/ptest-runner/ptest-runner/0003-utils-Ensure-pipes-are-read-after-exit.patch b/poky/meta/recipes-support/ptest-runner/ptest-runner/0003-utils-Ensure-pipes-are-read-after-exit.patch deleted file mode 100644 index f7c3ebe6f2..0000000000 --- a/poky/meta/recipes-support/ptest-runner/ptest-runner/0003-utils-Ensure-pipes-are-read-after-exit.patch +++ /dev/null @@ -1,76 +0,0 @@ -From e58e4e1a7f854953f823dc5135d35f728f253f31 Mon Sep 17 00:00:00 2001 -From: Richard Purdie <richard.purdie@linuxfoundation.org> -Date: Thu, 4 Apr 2019 14:24:14 +0100 -Subject: [PATCH 3/3] utils: Ensure pipes are read after exit - -There was a race in the code where the pipes may not be read after the process has exited -and data may be left behind in them. This change to ordering ensures the pipes are read -after the exit code has been read meaning no data can be left behind and the logs should -be complete. - -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> -Upstream-Status: Pending [code being tested] ---- - utils.c | 29 ++++++++++++++++------------- - 1 file changed, 16 insertions(+), 13 deletions(-) - -diff --git a/utils.c b/utils.c -index c5b3b8d..37e88ab 100644 ---- a/utils.c -+++ b/utils.c -@@ -264,6 +264,7 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid, pid_t group, - struct pollfd pfds[2]; - struct timespec sentinel; - clockid_t clock = CLOCK_MONOTONIC; -+ int looping = 1; - int r; - - int status; -@@ -281,9 +282,23 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid, pid_t group, - - *timeouted = 0; - -- while (1) { -+ while (looping) { - waitflags = WNOHANG; - -+ if (timeout >= 0) { -+ struct timespec time; -+ -+ clock_gettime(clock, &time); -+ if ((time.tv_sec - sentinel.tv_sec) > timeout) { -+ *timeouted = 1; -+ kill(-pid, SIGKILL); -+ waitflags = 0; -+ } -+ } -+ -+ if (waitpid(pid, &status, waitflags) == pid) -+ looping = 0; -+ - r = poll(pfds, 2, WAIT_CHILD_POLL_TIMEOUT_MS); - if (r > 0) { - char buf[WAIT_CHILD_BUF_MAX_SIZE]; -@@ -303,19 +318,7 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid, pid_t group, - } - - clock_gettime(clock, &sentinel); -- } else if (timeout >= 0) { -- struct timespec time; -- -- clock_gettime(clock, &time); -- if ((time.tv_sec - sentinel.tv_sec) > timeout) { -- *timeouted = 1; -- kill(-pid, SIGKILL); -- waitflags = 0; -- } - } -- -- if (waitpid(pid, &status, waitflags) == pid) -- break; - } - - fflush(fps[0]); --- -2.17.1 - diff --git a/poky/meta/recipes-support/ptest-runner/ptest-runner/0004-utils-ensure-child-can-be-session-leader.patch b/poky/meta/recipes-support/ptest-runner/ptest-runner/0004-utils-ensure-child-can-be-session-leader.patch deleted file mode 100644 index 13b4cbc7fb..0000000000 --- a/poky/meta/recipes-support/ptest-runner/ptest-runner/0004-utils-ensure-child-can-be-session-leader.patch +++ /dev/null @@ -1,212 +0,0 @@ -From 79698d3205dedba887e0d2492de945d3079de029 Mon Sep 17 00:00:00 2001 -From: Randy MacLeod <Randy.MacLeod@windriver.com> -Date: Thu, 6 Jun 2019 17:03:50 -0400 -Subject: [PATCH] utils: ensure child can be session leader - -When running the run-execscript bash ptest as a user rather than root, a warning: - bash: cannot set terminal process group (16036): Inappropriate ioctl for device - bash: no job control in this shell -contaminates the bash log files causing the test to fail. This happens only -when run under ptest-runner and not when interactively testing! - -The changes made to fix this include: -1. Get the process group id (pgid) before forking, -2. Set the pgid in both the parent and child to avoid a race, -3. Find, open and set permission on the child tty, and -4. Allow the child to attach to controlling tty. - -Also add '-lutil' to Makefile. This lib is from libc and provides openpty. - -Upstream-Status: Submitted [yocto@yoctoproject.org] - -Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> -Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> ---- - Makefile | 2 +- - utils.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++------ - 2 files changed, 92 insertions(+), 12 deletions(-) - -diff --git a/Makefile b/Makefile -index 1bde7be..439eb79 100644 ---- a/Makefile -+++ b/Makefile -@@ -29,7 +29,7 @@ TEST_DATA=$(shell echo `pwd`/tests/data) - all: $(SOURCES) $(EXECUTABLE) - - $(EXECUTABLE): $(OBJECTS) -- $(CC) $(LDFLAGS) $(OBJECTS) -o $@ -+ $(CC) $(LDFLAGS) $(OBJECTS) -lutil -o $@ - - tests: $(TEST_SOURCES) $(TEST_EXECUTABLE) - -diff --git a/utils.c b/utils.c -index ad737c2..f11ce39 100644 ---- a/utils.c -+++ b/utils.c -@@ -1,5 +1,6 @@ - /** - * Copyright (c) 2016 Intel Corporation -+ * Copyright (C) 2019 Wind River Systems, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License -@@ -22,23 +23,27 @@ - */ - - #define _GNU_SOURCE -+ - #include <stdio.h> - -+#include <dirent.h> -+#include <errno.h> -+#include <fcntl.h> -+#include <grp.h> - #include <libgen.h> --#include <signal.h> - #include <poll.h> --#include <fcntl.h> -+#include <pty.h> -+#include <signal.h> -+#include <stdlib.h> -+#include <string.h> - #include <time.h> --#include <dirent.h> -+#include <unistd.h> -+ -+#include <sys/ioctl.h> - #include <sys/resource.h> -+#include <sys/stat.h> - #include <sys/types.h> - #include <sys/wait.h> --#include <sys/stat.h> --#include <unistd.h> --#include <string.h> --#include <stdlib.h> -- --#include <errno.h> - - #include "ptest_list.h" - #include "utils.h" -@@ -346,6 +351,53 @@ wait_child(const char *ptest_dir, const char *run_ptest, pid_t pid, - return status; - } - -+/* Returns an integer file descriptor. -+ * If it returns < 0, an error has occurred. -+ * Otherwise, it has returned the slave pty file descriptor. -+ * fp should be writable, likely stdout/err. -+ */ -+static int -+setup_slave_pty(FILE *fp) { -+ int pty_master = -1; -+ int pty_slave = -1; -+ char pty_name[256]; -+ struct group *gptr; -+ gid_t gid; -+ int slave = -1; -+ -+ if (openpty(&pty_master, &pty_slave, pty_name, NULL, NULL) < 0) { -+ fprintf(fp, "ERROR: openpty() failed with: %s.\n", strerror(errno)); -+ return -1; -+ } -+ -+ if ((gptr = getgrnam(pty_name)) != 0) { -+ gid = gptr->gr_gid; -+ } else { -+ /* If the tty group does not exist, don't change the -+ * group on the slave pty, only the owner -+ */ -+ gid = -1; -+ } -+ -+ /* chown/chmod the corresponding pty, if possible. -+ * This will only work if the process has root permissions. -+ */ -+ if (chown(pty_name, getuid(), gid) != 0) { -+ fprintf(fp, "ERROR; chown() failed with: %s.\n", strerror(errno)); -+ } -+ -+ /* Makes the slave read/writeable for the user. */ -+ if (chmod(pty_name, S_IRUSR|S_IWUSR) != 0) { -+ fprintf(fp, "ERROR: chmod() failed with: %s.\n", strerror(errno)); -+ } -+ -+ if ((slave = open(pty_name, O_RDWR)) == -1) { -+ fprintf(fp, "ERROR: open() failed with: %s.\n", strerror(errno)); -+ } -+ return (slave); -+} -+ -+ - int - run_ptests(struct ptest_list *head, const struct ptest_options opts, - const char *progname, FILE *fp, FILE *fp_stderr) -@@ -362,6 +414,8 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, - int timeouted; - time_t sttime, entime; - int duration; -+ int slave; -+ int pgid = -1; - - if (opts.xml_filename) { - xh = xml_create(ptest_list_length(head), opts.xml_filename); -@@ -379,7 +433,6 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, - close(pipefd_stdout[1]); - break; - } -- - fprintf(fp, "START: %s\n", progname); - PTEST_LIST_ITERATE_START(head, p); - char *ptest_dir = strdup(p->run_ptest); -@@ -388,6 +441,13 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, - break; - } - dirname(ptest_dir); -+ if (ioctl(0, TIOCNOTTY) == -1) { -+ fprintf(fp, "ERROR: Unable to detach from controlling tty, %s\n", strerror(errno)); -+ } -+ -+ if ((pgid = getpgid(0)) == -1) { -+ fprintf(fp, "ERROR: getpgid() failed, %s\n", strerror(errno)); -+ } - - child = fork(); - if (child == -1) { -@@ -395,13 +455,33 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, - rc = -1; - break; - } else if (child == 0) { -- setsid(); -+ close(0); -+ if ((slave = setup_slave_pty(fp)) < 0) { -+ fprintf(fp, "ERROR: could not setup pty (%d).", slave); -+ } -+ if (setpgid(0,pgid) == -1) { -+ fprintf(fp, "ERROR: setpgid() failed, %s\n", strerror(errno)); -+ } -+ -+ if (setsid() == -1) { -+ fprintf(fp, "ERROR: setsid() failed, %s\n", strerror(errno)); -+ } -+ -+ if (ioctl(0, TIOCSCTTY, NULL) == -1) { -+ fprintf(fp, "ERROR: Unable to attach to controlling tty, %s\n", strerror(errno)); -+ } -+ - run_child(p->run_ptest, pipefd_stdout[1], pipefd_stderr[1]); -+ - } else { - int status; - int fds[2]; fds[0] = pipefd_stdout[0]; fds[1] = pipefd_stderr[0]; - FILE *fps[2]; fps[0] = fp; fps[1] = fp_stderr; - -+ if (setpgid(child, pgid) == -1) { -+ fprintf(fp, "ERROR: setpgid() failed, %s\n", strerror(errno)); -+ } -+ - sttime = time(NULL); - fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, sttime)); - fprintf(fp, "BEGIN: %s\n", ptest_dir); --- -2.17.0 - diff --git a/poky/meta/recipes-support/ptest-runner/ptest-runner_2.3.1.bb b/poky/meta/recipes-support/ptest-runner/ptest-runner_2.3.2.bb index dec60fcc9b..187f22df04 100644 --- a/poky/meta/recipes-support/ptest-runner/ptest-runner_2.3.1.bb +++ b/poky/meta/recipes-support/ptest-runner/ptest-runner_2.3.2.bb @@ -7,14 +7,10 @@ HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" -SRCREV = "63d097cc46142157931682fed076b5407757a0bd" -PV = "2.3.1+git${SRCPV}" +SRCREV = "7015e9199ce748c0717addeebe7a8c47448bab03" +PV = "2.3.2+git${SRCPV}" SRC_URI = "git://git.yoctoproject.org/ptest-runner2 \ - file://0001-utils-Ensure-stdout-stderr-are-flushed.patch \ - file://0002-use-process-groups-when-spawning.patch \ - file://0003-utils-Ensure-pipes-are-read-after-exit.patch \ - file://0004-utils-ensure-child-can-be-session-leader.patch \ " S = "${WORKDIR}/git" |