On 6/19/19 3:24 PM, richard.pur...@linuxfoundation.org wrote:
On Wed, 2019-06-19 at 13:49 -0400, Randy MacLeod wrote:
On 6/14/19 10:48 AM, Randy MacLeod wrote:
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.

Hmmm, I was making the code compile cleanly under clang using
    -Weverything
when I noticed:

1. the 'make check' tests. They still work fine.
2. The './ptest-runner -d tests/data -t 1' tests
     which now generate loads of error like:
      ERROR: Unable to detach from controlling tty, Inappropriate
ioctl
for device

Aha.

Does this mean you get to own:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13409

:)

Yes, that's likely my fault.
I've taken the defect.

../Randy 'belt and suspenders' MacLeod



so while this change fixed the bash-ptest, the ptest-runner self-test
it did something wrong.... Ah, I'm calling:
     ioctl(0, TIOCNOTTY) == -1)
repeatedly in the parent so that's what's generating the extra logs.
Fixed locally and I'll send a patch but it's not urgent. Phew! :)

Anibal,

If you could reply to explain your plans for Richard's patches
that would help me figure out when to send the clang warning clean-
ups commits and what commit to base my work on.

I think he believed some of them unnecessary, they were a bit belt and
brances but I'm not sure that is a bad thing.

Cheers,

Richard



--
# Randy MacLeod
# Wind River Linux
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to