Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1746861

Summary: [RHEL 7] ioctl_evdev-success tests from strace internal testsuite fail tests-m32
Product: Red Hat Enterprise Linux 7 Reporter: Eugene Syromiatnikov <esyr>
Component: straceAssignee: Eugene Syromiatnikov <esyr>
Status: CLOSED ERRATA QA Contact: Edjunior Barbosa Machado <emachado>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.8CC: dj, emachado, law, mnewsome, ohudlick, tborcin
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: strace-4.24-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1746478 Environment:
Last Closed: 2020-03-31 19:08:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1746478    
Bug Blocks: 1710953    

Description Eugene Syromiatnikov 2019-08-29 11:55:05 UTC
+++ This bug was initially created as a clone of Bug #1746478 +++

Description of problem:
2 ioctl_evdev-success tests from devtoolset-9-strace internal testsuite are failing in rhel-7.7 x86_64 tests-m32:

(...)
FAIL: ioctl_evdev-success-v.test
FAIL: ioctl_evdev-success.test
(...)

From rpmbuild/BUILD/strace-5.1/tests-m32/test-suite.log:

FAIL: ioctl_evdev-success-v
===========================

--- exp.0       2019-08-28 09:54:38.843189792 -0400
+++ out.0       2019-08-28 09:54:38.857189528 -0400
@@ -258,10 +258,10 @@
 ioctl(-1, EVIOCGABS(ABS_X), {value=4294967295, minimum=4294967295, maximum=4294967295, fuzz=4294967295, flat=4294967295, resolution=4294967295}) = 0 (INJECTED)
 ioctl(-1, EVIOCGABS(ABS_Y), {value=4294967295, minimum=4294967295, maximum=4294967295, fuzz=4294967295, flat=4294967295, resolution=4294967295}) = 0 (INJECTED)
 ioctl(-1, EVIOCGABS(ABS_Y), {value=4294967295, minimum=4294967295, maximum=4294967295, fuzz=4294967295, flat=4294967295, resolution=4294967295}) = 0 (INJECTED)
-ioctl(-1, EVIOCGBIT(0, 0), [EV_ABS, EV_MSC, EV_LED, EV_SND, EV_PWR]) = 0 (INJECTED)
-ioctl(-1, EVIOCGBIT(0, 0), [EV_ABS, EV_MSC, EV_LED]) = 0 (INJECTED)
-ioctl(-1, EVIOCGBIT(0, 0), [ 0 ]) = 0 (INJECTED)
-ioctl(-1, EVIOCGBIT(EV_KEY, 0), [KEY_1, KEY_2]) = 0 (INJECTED)
+ioctl(-1, EVIOCGBIT(0, 0), 0xff7facb4) = 0 (INJECTED)
+ioctl(-1, EVIOCGBIT(0, 0), 0xff7facb8) = 0 (INJECTED)
+ioctl(-1, EVIOCGBIT(0, 0), 0xff7facbc) = 0 (INJECTED)
+ioctl(-1, EVIOCGBIT(EV_KEY, 0), 0xff7facd0) = 0 (INJECTED)
 ioctl(-1, EVIOCGMTSLOTS(12), {code=ABS_MT_SLOT, values=[1, 3]}) = 0 (INJECTED)
 ioctl(-1, EVIOCGMTSLOTS(8), {code=0xffffffff /* ABS_MT_??? */, values=[1]}) = 0 (INJECTED)
 +++ exited with 0 +++
ioctl_evdev-success-v.test: failed test: ../../strace -a16 -v -e trace=ioctl -e inject=ioctl:retval=0:when=256+ ../ioctl_evdev-success-v 256 0 output mismatch
FAIL ioctl_evdev-success-v.test (exit status: 1)

FAIL: ioctl_evdev-success
=========================

--- exp.0       2019-08-28 09:54:38.970187400 -0400
+++ out.0       2019-08-28 09:54:38.995186929 -0400
@@ -258,10 +258,10 @@
 ioctl(-1, EVIOCGABS(ABS_X), {value=4294967295, minimum=4294967295, ...}) = 0 (INJECTED)
 ioctl(-1, EVIOCGABS(ABS_Y), {value=4294967295, minimum=4294967295, ...}) = 0 (INJECTED)
 ioctl(-1, EVIOCGABS(ABS_Y), {value=4294967295, minimum=4294967295, ...}) = 0 (INJECTED)
-ioctl(-1, EVIOCGBIT(0, 0), [EV_ABS, EV_MSC, EV_LED, EV_SND, ...]) = 0 (INJECTED)
-ioctl(-1, EVIOCGBIT(0, 0), [EV_ABS, EV_MSC, EV_LED]) = 0 (INJECTED)
-ioctl(-1, EVIOCGBIT(0, 0), [ 0 ]) = 0 (INJECTED)
-ioctl(-1, EVIOCGBIT(EV_KEY, 0), [KEY_1, KEY_2]) = 0 (INJECTED)
+ioctl(-1, EVIOCGBIT(0, 0), 0xffe70a24) = 0 (INJECTED)
+ioctl(-1, EVIOCGBIT(0, 0), 0xffe70a28) = 0 (INJECTED)
+ioctl(-1, EVIOCGBIT(0, 0), 0xffe70a2c) = 0 (INJECTED)
+ioctl(-1, EVIOCGBIT(EV_KEY, 0), 0xffe70a40) = 0 (INJECTED)
 ioctl(-1, EVIOCGMTSLOTS(12), {code=ABS_MT_SLOT, values=[1, 3]}) = 0 (INJECTED)
 ioctl(-1, EVIOCGMTSLOTS(8), {code=0xffffffff /* ABS_MT_??? */, values=[1]}) = 0 (INJECTED)
 +++ exited with 0 +++
ioctl_evdev-success.test: failed test: ../../strace -a16 -e trace=ioctl -e inject=ioctl:retval=0:when=256+ ../ioctl_evdev-success 256 0 output mismatch
FAIL ioctl_evdev-success.test (exit status: 1)

These failures occur only in tests-m32/ run, not in tests/. They were also not reproducible in other rhel-7.7 supported arches.

Version-Release number of selected component (if applicable):
devtoolset-9-strace-5.1-1.el7.x86_64
RHEL-7.7-updates-20190813.0

Steps to Reproduce:
1. rpm -ivh devtoolset-9-strace-5.1-1.el7.src.rpm 
2. rpmbuild -bc rpmbuild/SPECS/strace.spec 
3. make -C rpmbuild/BUILD/strace-5.1/ -k check RUNTESTFLAGS="--tool_exec=/opt/rh/devtoolset-9/root/usr/bin/strace"

--- Additional comment from Eugene Syromiatnikov on 2019-08-29 10:02:47 UTC ---

A side note: strace does not use dejagnu framework (to which "--tool_exec" option and RUNTESTFLAGS are specific), but rather generic automake-provided test invocation infrastructure with a standard test driver. It is still, however, possible to override path to the strace binary with STRACE variable (see tests/init.sh file in strace repository): "make -j6 -C rpmbuild/BUILD/strace-5.1/ -k check STRACE=/opt/rh/devtoolset-9/root/usr/bin/strace".

The other thing is that in addition to build dependencies (and devtoolset-9-strace itself), glibc-devel.i686 and libgcc.i686 have to be installed.

Comment 2 Eugene Syromiatnikov 2019-08-29 16:16:02 UTC
For RHEL 7 strace, there are some additional missing changes:

 * 0002-evdev-fix-decoding-of-EVIOCGBIT-0.patch: tests-m32/ioctl_evdev.c, tests-mx32/ioctl_evdev.c
 * 0023-tests-move-PTRACE_SEIZE-check-to-a-separate-file.patch: tests-mx32/PTRACE_SEIZE.sh
 * 0025-tests-check-tracing-of-looping-threads.patch: tests-m32/looping_threads.test, tests-mx32/looping_threads.test

Comment 4 Edjunior Barbosa Machado 2019-10-16 14:16:36 UTC
Verified that the aforementioned testcases ran successfully with strace-4.24-4.el7 on RHEL-7.8-20191015.n.0:

PASS: ioctl_evdev-success.test
PASS: ioctl_evdev-success-v.test

https://beaker.engineering.redhat.com/tasks/executed?task=%2Ftools%2Fstrace%2FSanity%2Finternal-tests&job_id=3843790

Comment 6 errata-xmlrpc 2020-03-31 19:08:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:0988