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 1978479

Summary: [RHEL-9.0] /kernel/RHEL6/buildcheck - in_tree_nowarn fails
Product: Red Hat Enterprise Linux 9 Reporter: PaulB <pbunyan>
Component: kernelAssignee: Kernel Drivers <hwkernel-mgr>
kernel sub component: Platform Enablement QA Contact: Kernel-QE - Hardware <kernel-qe-hw>
Status: CLOSED NOTABUG Docs Contact:
Severity: high    
Priority: high CC: efuller, ernunes, jbastian, jfeeney, pbunyan, rvr, zhilli
Version: 9.0Flags: pm-rhel: mirror+
Target Milestone: beta   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-20 08:12:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description PaulB 2021-07-01 22:40:57 UTC
Description of problem:
While testing /kernel/RHEL6/buildcheck with RHEL-9* running the following command fails:
 make ARCH=arm64 -j32 O=/mnt/tests/kernel/RHEL6/buildcheck/objdir lib/in_tree_nowarn/in_tree_nowarn.ko

Version-Release number of selected component (if applicable):
 distro: RHEL-9.0.0-20210626.0 
 kernel: 5.13.0-0.rc7.51.el9 
 task: /kernel/RHEL6/buildcheck 1.0-56

How reproducible:
Consistently reproducible.

Steps to Reproduce:
1. Install any arch system with RHEL-9.0.0-20210626.0 [5.13.0-0.rc7.51.el9]
2. Run /kernel/RHEL6/buildcheck
3.

Actual results:
https://beaker.engineering.redhat.com/recipes/10205919#task128050357
https://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2021/06/55108/5510873/10205919/128050357/K_DeBug.2mePL2
---%<-snip->%---
2021-06-28 01:51:59:  Running: make ARCH=arm64 -j32 O=/mnt/tests/kernel/RHEL6/buildcheck/objdir lib/in_tree_nowarn/in_tree_nowarn.ko
2021-06-28 01:52:01:  FAILED: -Werror make command
2021-06-28 01:52:02: Exit make_and_compile_module
---%<-snip->%---

Expected results:
Successful completion of task


Additional info:

Comment 1 PaulB 2021-07-01 22:52:07 UTC
All,
Issue reported in the opening comment was seen while testing the following aarch64 system:
host: ampere-hr350a-07

Here are some reproducers:
 distro: RHEL-9.0.0-20210626.0 
 kernel: 5.13.0-0.rc7.51.el9 
 task: /kernel/RHEL6/buildcheck 1.0-56

==========
aarch64
==========
https://beaker.engineering.redhat.com/tasks/executed?arch_id=10&task=%2Fkernel%2FRHEL6%2Fbuildcheck&result=Fail&job_id=5510873&whiteboard=5.13.0-0.rc7.51.el9++ampere-altra
https://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2021/06/55108/5510873/10205920/128050382/602482946/resultoutputfile.log


==========
ppc64le
==========
https://beaker.engineering.redhat.com/tasks/executed?arch_id=11&task=%2Fkernel%2FRHEL6%2Fbuildcheck&result=Fail&job_id=5510872&whiteboard=5.13.0-0.rc7.51.el9
https://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2021/06/55108/5510872/10205906/128050076/602501371/resultoutputfile.log


==========
s390x
==========
https://beaker.engineering.redhat.com/tasks/executed?arch_id=7&task=%2Fkernel%2FRHEL6%2Fbuildcheck&result=Fail&job_id=5510872&whiteboard=5.13.0-0.rc7.51.el9
https://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2021/06/55108/5510872/10205917/128050316/602496835/resultoutputfile.log


==========
x86_64
==========
https://beaker.engineering.redhat.com/tasks/executed?arch_id=2&task=%2Fkernel%2FRHEL6%2Fbuildcheck&result=Fail&job_id=5510872&whiteboard=5.13.0-0.rc7.51.el9
https://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2021/06/55108/5510872/10205895/128049836/602488297/resultoutputfile.log


Best,
pbunyan

Comment 4 PaulB 2021-12-17 17:37:34 UTC
Li Zhili,
I see your MR here:
https://gitlab.cee.redhat.com/kernel-qe/kernel/-/merge_requests/941

The RHEL6/buildcheck/runtest.sh task was still failing for me.
However, keeping the original code and adding your code to the runtest.sh
works for me. 


commit 8a132656f812fbb5f6519e9e638050b2c11ece60 (tag: kernel-RHEL6-buildcheck-1_0-57)
Author: Paul Bunyan <pbunyan.csb>
Date:   Thu Dec 16 15:12:03 2021 -0500

    BZ1978479: use zhilli patch to fix buildcheck for RHEL9

diff --git a/RHEL6/buildcheck/runtest.sh b/RHEL6/buildcheck/runtest.sh
index 4aeffea6bb..ab2791d13b 100644
--- a/RHEL6/buildcheck/runtest.sh
+++ b/RHEL6/buildcheck/runtest.sh
@@ -530,10 +530,21 @@ do
 
                     create_dummy_module "$topdir" "$name" "$warn"
                     if [ "$in_tree" == "in_tree" ]; then
+                        echo "" | tee -a $OUTPUTFILE
+                        # for RHEL-9, old method can not build in tree modules
+                        # so we have to change our way
+                        KMAJOR=$(uname -r | sed 's/\..*$//')
+                        if [ "$KMAJOR" -ge "5" ]; then
+                            echo "" | tee -a $OUTPUTFILE
+                            K_EchoAll "Running: $makecmd -C /lib/modules/$(uname -r)/build M=${PREPDIR}/${topdir}/${name} modules"
+                            $makecmd -C /lib/modules/$(uname -r)/build M=${PREPDIR}/${topdir}/${name} modules >> $OUTPUTFILE 2>&1
+                        else
+                       # not RHEL-9 (using old method)
                         echo "" | tee -a $OUTPUTFILE
                         K_EchoAll "Running: $makecmd O=$objdir $topdir/$name/${name}.ko"
                         $makecmd O=$objdir $topdir/$name/${name}.ko >> $OUTPUTFILE 2>&1
                         ret=$?
+                       fi
                     else
                         echo "" | tee -a $OUTPUTFILE
                         K_EchoAll "Running: $makecmd O=$objdir M=$topdir/$name"


----------------------
Testing verified here:
----------------------
buildcheck: [RHEL-6][x86_64] BZ1978479
  https://beaker.engineering.redhat.com/jobs/6105871 - PASS

buildcheck: [RHEL-7][x86_64] BZ1978479
   https://beaker.engineering.redhat.com/jobs/6105869 - PASS

buildcheck: [RHEL-8][x86_64] BZ1978479
   https://beaker.engineering.redhat.com/jobs/6105872 - PASS

buildcheck: [RHEL-9][x86_64] BZ1978479
   https://beaker.engineering.redhat.com/jobs/6105873 - PASS


Looks like this can be closed with fixed in version kernel-RHEL6-buildcheck-1_0-57.
Thank you for the fix!
Best,
pbunyan

Comment 5 Li Zhili 2021-12-20 08:12:44 UTC
Close bug as NOTABUG per comment #4