This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1251972 - acpica-tools tests fail on ppc64
acpica-tools tests fail on ppc64
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: acpica-tools (Show other bugs)
22
ppc64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Al Stone
Fedora Extras Quality Assurance
:
Depends On:
Blocks: ZedoraTracker PPCTracker
  Show dependency treegraph
 
Reported: 2015-08-10 08:40 EDT by Rafael Fonseca
Modified: 2015-11-04 17:24 EST (History)
2 users (show)

See Also:
Fixed In Version: 20150818-2 acpica-tools-20150818-2.fc23 acpica-tools-20150818-2.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-04 15:55:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output from test on ppc64 (13.86 KB, text/plain)
2015-08-10 08:40 EDT, Rafael Fonseca
no flags Details
Fix little-endian assumption in method name check (775 bytes, patch)
2015-09-11 11:40 EDT, Al Stone
no flags Details | Diff

  None (edit)
Description Rafael Fonseca 2015-08-10 08:40:13 EDT
Created attachment 1061026 [details]
Output from test on ppc64

Description of problem: running the tests fails in the ppc64 architecture. The output is: 

# ./run-misc-tests.sh /builddir/build/BUILDROOT/acpica-tools-20150717-1.fc22.ppc64/usr/bin/ 20150717
+ BINDIR=/builddir/build/BUILDROOT/acpica-tools-20150717-1.fc22.ppc64/usr/bin/
+ VERSION=20150717
+ /builddir/build/BUILDROOT/acpica-tools-20150717-1.fc22.ppc64/usr/bin//iasl -h
Supports ACPI Specification Revision 6.0

Usage: iasl [Options] [Files]
Options:

General:
  -@ <file>         Specify command file
  -I <dir>          Specify additional include directory
  -T <sig>|ALL|*    Create table template file for ACPI <Sig>
  -p <prefix>       Specify path/filename prefix for all output files
  -v                Display compiler version
  -vo               Enable optimization comments
  -vs               Disable signon

Help:
  -h                This message
  -hc               Display operators allowed in constant expressions
  -hf               Display help for output filename generation
  -hr               Display ACPI reserved method names
  -ht               Display currently supported ACPI table names

Preprocessor:
  -D <symbol>       Define symbol for preprocessor use
  -li               Create preprocessed output file (*.i)
  -P                Preprocess only and create preprocessor output file (*.i)
  -Pn               Disable preprocessor

Errors, Warnings, and Remarks:
  -va               Disable all errors/warnings/remarks
  -ve               Report only errors (ignore warnings and remarks)
  -vi               Less verbose errors and warnings for use with IDEs
  -vr               Disable remarks
  -vw <messageid>   Disable specific warning or remark
  -w1 -w2 -w3       Set warning reporting level
  -we               Report warnings as errors

AML Code Generation (*.aml):
  -oa               Disable all optimizations (compatibility mode)
  -of               Disable constant folding
  -oi               Disable integer optimization to Zero/One/Ones
  -on               Disable named reference string optimization
  -cr               Disable Resource Descriptor error checking
  -in               Ignore NoOp operators
  -r <revision>     Override table header Revision (1-255)

Optional Source Code Output Files:
  -sc -sa           Create source file in C or assembler (*.c or *.asm)
  -ic -ia           Create include file in C or assembler (*.h or *.inc)
  -tc -ta -ts       Create hex AML table in C, assembler, or ASL (*.hex)
  -so               Create offset table in C (*.offset.h)

Optional Listing Files:
  -l                Create mixed listing file (ASL source and AML) (*.lst)
  -lm               Create hardware summary map file (*.map)
  -ln               Create namespace file (*.nsp)
  -ls               Create combined source file (expanded includes) (*.src)

Data Table Compiler:
  -G                Compile custom table that contains generic operators
  -vt               Create verbose template files (full disassembly)

AML Disassembler:
  -d  <f1 f2 ...>   Disassemble or decode binary ACPI tables to file (*.dsl)
                      (Optional, file type is automatically detected)
  -da <f1 f2 ...>   Disassemble multiple tables from single namespace
  -db               Do not translate Buffers to Resource Templates
  -dc <f1 f2 ...>   Disassemble AML and immediately compile it
                      (Obtain DSDT from current system if no input file)
  -df               Force disassembler to assume table contains valid AML
  -dl               Emit legacy ASL code only (no C-style operators)
  -e  <f1 f2 ...>   Include ACPI table(s) for external symbol resolution
  -fe <file>        Specify external symbol declaration file
  -in               Ignore NoOp opcodes
  -vt               Dump binary table data in hex format within output file

Debug Options:
  -bf               Create debug file (full output) (*.txt)
  -bs               Create debug file (parse tree only) (*.txt)
  -bp <depth>       Prune ASL parse tree
  -bt <type>        Object type to be pruned from the parse tree
  -f                Ignore errors, force creation of AML output file(s)
  -m <size>         Set internal line buffer size (in Kbytes)
  -n                Parse only, no output generation
  -ot               Display compile times and statistics
  -x <level>        Set debug level for trace output
  -z                Do not insert new compiler ID for DataTables
++ uname -m
+ m=ppc64
+ case $m in
+ BITS=64
++ stat --format=%Y /builddir/build/BUILDROOT/acpica-tools-20150717-1.fc22.ppc64/usr/bin//iasl
++ cut '-d ' -f1
+ FDATE=1439193928
++ date --date=@1439193928 '+%b %_d %Y'
+ WHEN='Aug 10 2015'
+ sed -e 's/XXXXXXXXXXX/Aug 10 2015/' -e s/YYYY/64/ -e s/VVVVVVVV/20150717/ ../badcode.asl.result
+ sed -e 's/XXXXXXXXXXX/Aug 10 2015/' -e s/YYYY/64/ -e s/VVVVVVVV/20150717/ ../grammar.asl.result
+ cd misc
+ tee badcode
+ /builddir/build/BUILDROOT/acpica-tools-20150717-1.fc22.ppc64/usr/bin//iasl -f badcode.asl
badcode.asl     25:     Mutex (MTX1, 32)
Error    6125 -                      ^ SyncLevel must be in the range 0-15

badcode.asl     29:     Name (BIG, 0x1234567887654321)
Warning  3038 -                                    ^ 64-bit integer in 32-bit table, truncating (DSDT version < 2)

badcode.asl     33:     Name (PKG1, Package(5) {0,1})
Remark   2063 -                            ^ Initializer list shorter than declared package length

badcode.asl     37:     Name (PATH, Buffer() {"\_SB_.PCI2._CRS"})
Warning  3046 -                                ^ Invalid or unknown escape sequence

badcode.asl     41:     Name (ESC1, "abcdefg\x00hijklmn")
Warning  3055 -                                ^ Invalid Hex/Octal Escape - Non-ASCII or NULL

badcode.asl     49:         FLD1, 8
Error    6030 -               ^ Access width of Field Unit extends beyond region limit

badcode.asl     55:     Field (OPR2, DWordAcc, NoLock, Preserve)
Error    6100 -                  ^ Host Operation Region requires ByteAcc access

badcode.asl     60:     Field (OPR3, WordAcc, NoLock, Preserve)
Error    6099 -                  ^ Host Operation Region requires BufferAcc access

badcode.asl     67:     Method (MTH1, 0, NotSerialized, 32)
Error    6125 -     SyncLevel must be in the range 0-15 ^ 

badcode.asl     71:         Store (Arg3, Local0)
Warning  3144 -                              ^ Method Local is set but never used (Local0)

badcode.asl     71:         Store (Arg3, Local0)
Error    6006 -                      ^ Method argument is not initialized (Arg3)

badcode.asl     71:         Store (Arg3, Local0)
Remark   2087 -                      ^ Not a parameter, used as local only (Arg3)

badcode.asl     72:         Store (Local1, Local2)
Warning  3144 -                                ^ Method Local is set but never used (Local2)

badcode.asl     72:         Store (Local1, Local2)
Error    6066 -                        ^ Method local variable is not initialized (Local1)

badcode.asl     76:         Subtract (MTX1, 4, Local3)
Warning  3144 - Method Local is set but never used ^  (Local3)

badcode.asl     76:         Subtract (MTX1, 4, Local3)
Error    6058 -            Invalid type ^  ([Mutex|Reference] found, Subtract operator requires [Integer|String|Buffer])

badcode.asl     80:         CreateField (BUF1, 0, Subtract (4, 4), FLD1)
Remark   2089 -                             Object is not referenced ^  (Name is within method [MTH1])

badcode.asl     80:         CreateField (BUF1, 0, Subtract (4, 4), FLD1)
Error    6083 -                  Operand evaluates to zero ^ 

badcode.asl     84:         Acquire (MTX1, 100)
Warning  3130 -                             ^ Result is not used, possible operator timeout will be missed

badcode.asl     85:         Wait (EVT1, 1)
Warning  3130 -                        ^ Result is not used, possible operator timeout will be missed

badcode.asl     89:         Add (INT1, 8)
Error    6114 -                    ^ Result is not used, operator has no effect

badcode.asl     94:         Store (5, INT1)
Warning  3134 -                   ^ Statement is unreachable

badcode.asl     97:     Method (MTH2)
Remark   2119 -                   ^ Control Method marked Serialized (Due to use of Switch operator)

badcode.asl     97:     Method (MTH2)
Warning  3115 -                   ^ Not all control paths return a value (MTH2)

badcode.asl    101:         Switch (ToInteger (INT1))
Error    6078 -                            ^ No Case statements under Switch

badcode.asl    120:         Store (MTH2 (), Local0)
Warning  3144 -                                 ^ Method Local is set but never used (Local0)

badcode.asl    120:         Store (MTH2 (), Local0)
Warning  3122 -                      ^ Called method may not always return a value

badcode.asl    126:     Method (MTH5) {Store (MTH4(), Local0)}
Warning  3144 -        Method Local is set but never used ^  (Local0)

badcode.asl    126:     Method (MTH5) {Store (MTH4(), Local0)}
Error    6080 -  Called method returns no value ^ 

badcode.asl    132:         Name (_HID, "*PNP0C0A")     // Illegal leading asterisk
Error    6061 -        Invalid leading asterisk ^  (*PNP0C0A)

badcode.asl    136:         Name (_HID, "PNP")          // Too short, must be 7 or 8 chars
Error    6033 -                            ^ _HID string must be exactly 7 or 8 characters (PNP)

badcode.asl    140:         Name (_HID, "MYDEVICE01")   // Too long, must be 7 or 8 chars
Error    6033 -                                   ^ _HID string must be exactly 7 or 8 characters (MYDEVICE01)

badcode.asl    144:         Name (_HID, "acpi0001")     // non-hex chars must be uppercase
Error    6034 -                                 ^ _HID prefix must be all uppercase or decimal digits (acpi0001)

badcode.asl    148:         Name (_HID, "PNP-123")      // HID must be alphanumeric
Error    6002 -                                ^ String must be entirely alphanumeric (PNP-123)

badcode.asl    152:         Name (_HID, "")             // Illegal Null HID
Error    6091 -                         ^ Invalid zero-length (null) string

badcode.asl    153:         Name (_CID, "")             // Illegal Null CID
Error    6091 -                         ^ Invalid zero-length (null) string

badcode.asl    158:     Name (_PRW, 4)
Error    6105 -                    ^ Invalid object type for reserved name (_PRW: found Integer, Package required)

badcode.asl    159:     Name (_FDI, Buffer () {0})
Error    6105 -                            ^ Invalid object type for reserved name (_FDI: found Buffer, Package required)

badcode.asl    164:     Method (_OSC, 5)
Remark   2146 -                   ^ Method Argument is never used (Arg0)

badcode.asl    164:     Method (_OSC, 5)
Remark   2146 -                   ^ Method Argument is never used (Arg1)

badcode.asl    164:     Method (_OSC, 5)
Remark   2146 -                   ^ Method Argument is never used (Arg2)

badcode.asl    164:     Method (_OSC, 5)
Remark   2146 -                   ^ Method Argument is never used (Arg3)

badcode.asl    164:     Method (_OSC, 5)
Remark   2146 -                   ^ Method Argument is never used (Arg4)

badcode.asl    164:     Method (_OSC, 5)
Warning  3101 -                   ^ Reserved method has too many arguments (_OSC requires 4)

badcode.asl    164:     Method (_OSC, 5)
Warning  3107 -                   ^ Reserved method must return a value (Buffer required for _OSC)

badcode.asl    170:     Name (_L01, 1)
Error    6103 -                 ^ Reserved name must be a control method (with zero arguments)

badcode.asl    171:     Name (_E02, 2)
Error    6103 -                 ^ Reserved name must be a control method (with zero arguments)

badcode.asl    172:     Name (_Q03, 3)
Error    6103 -                 ^ Reserved name must be a control method (with zero arguments)

badcode.asl    173:     Name (_ON,  0)
Error    6103 -                ^ Reserved name must be a control method (with zero arguments)

badcode.asl    174:     Name (_INI, 1)
Error    6103 -                 ^ Reserved name must be a control method (with zero arguments)

badcode.asl    175:     Name (_PTP, 2)
Error    6103 -                 ^ Reserved name must be a control method (with arguments)

badcode.asl    184:         Method (_E1D)
Error    6032 -                       ^ Name conflicts with a previous GPE method (_L1D)

badcode.asl    191:     Method (_FDM, 1)
Remark   2146 -                   ^ Method Argument is never used (Arg0)

badcode.asl    193:         Return (Buffer(1){0x33})
Warning  3104 -                         ^ Reserved method should not return a value (_FDM)

badcode.asl    197:         Return ("Unexpected Return Value")
Warning  3104 -  Reserved method should not return a value ^  (_Q22)

badcode.asl    203:     Device (EC)
Warning  3141 -                 ^ Missing dependency (Device object requires a _HID or _ADR in same scope)

badcode.asl    205:         Method (_REG, 2)
Remark   2146 -                       ^ Method Argument is never used (Arg0)

badcode.asl    205:         Method (_REG, 2)
Remark   2146 -                       ^ Method Argument is never used (Arg1)

badcode.asl    205:         Method (_REG, 2)
Warning  3079 -                       ^ _REG has no corresponding Operation Region

badcode.asl    219:             StartDependentFn (0, 0)
Error    6019 -                                  ^ Dependent function macros cannot be nested

badcode.asl    225:     })
Error    6070 -        ^ Missing EndDependentFn() macro in dependent resource list

badcode.asl    242:             0x00002000,         // Length
Error    6049 -                         ^ Length is larger than Min/Max window

badcode.asl    247:             0x00001001,         // Range Minimum
Error    6001 -                         ^ Must be a multiple of alignment/granularity value

badcode.asl    248:             0x00002002,         // Range Maximum
Error    6001 -                         ^ Must be a multiple of alignment/granularity value

badcode.asl    255:             0xFFFF,             // Address
Warning  3060 -                     ^ Maximum 10-bit ISA address (0x3FF)

badcode.asl    264:             0x05                // Access Size
Error    6042 -                   ^ Invalid AccessSize (Maximum is 4 - QWord access)

badcode.asl    268:         QWordSpace (0xB0, ResourceConsumer, PosDecode, MinFixed, MaxFixed, 0xA5,
Error    6139 -     Constant out of range ^  (0xB0, allowable: 0xC0-0xFF)

badcode.asl    279:             0x0200,             // Range Minimum
Error    6051 -                     ^ Address Min is greater than Address Max

badcode.asl    291:             0x00001002,         // Length
Error    6049 -                         ^ Length is larger than Min/Max window

badcode.asl    296:             0x00000010,
Error    6048 -                         ^ Granularity must be zero or a power of two minus one

badcode.asl    305:             0x0000000000000B02, // Range Minimum
Error    6001 -                                 ^ Must be a multiple of alignment/granularity value

badcode.asl    315:             0x00000000002FFFFE, // Range Maximum
Error    6001 -                                 ^ Must be a multiple of alignment/granularity value (-1)

badcode.asl    326:             0x00000000,         // Length
Error    6043 -                         ^ Invalid combination of Length and Min/Max fixed flags

badcode.asl    335:             0x00000100,         // Length
Error    6043 -                         ^ Invalid combination of Length and Min/Max fixed flags

badcode.asl    344:             0x00000200,         // Length
Error    6043 -                         ^ Invalid combination of Length and Min/Max fixed flags

badcode.asl    349:             0x0000000F,         // Granularity
Error    6047 -                         ^ Granularity must be zero for fixed Min/Max

badcode.asl    358:         DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
Error    6090 -                                    ^ Min/Max/Length/Gran are all zero, but no resource tag

badcode.asl    368:         EndDependentFn ()
Error    6071 -                            ^ Missing StartDependentFn() macro in dependent resource list

badcode.asl    388:         CreateWordField (RSC3, \DWI1._LEN, LEN)
Warning  3128 -              ResourceTag larger than Field ^  (Size mismatch, Tag: 32 bits, Field: 16 bits)

badcode.asl    388:         CreateWordField (RSC3, \DWI1._LEN, LEN)
Remark   2089 -                        Object is not referenced ^  (Name is within method [REM1])

badcode.asl    389:         CreateByteField (RSC3, \DWI1._MIN, MIN)
Warning  3128 -              ResourceTag larger than Field ^  (Size mismatch, Tag: 32 bits, Field: 8 bits)

badcode.asl    389:         CreateByteField (RSC3, \DWI1._MIN, MIN)
Remark   2089 -                        Object is not referenced ^  (Name is within method [REM1])

badcode.asl    390:         CreateBitField (RSC3, \DWI1._RNG, RNG1)
Warning  3128 -             ResourceTag larger than Field ^  (Size mismatch, Tag: 2 bits, Field: 1 bit)

badcode.asl    390:         CreateBitField (RSC3, \DWI1._RNG, RNG1)
Remark   2089 -                        Object is not referenced ^  (Name is within method [REM1])

badcode.asl    394:         CreateQWordField (RSC3, \DWI1._MAX, MAX)
Warning  3129 -              ResourceTag smaller than Field ^  (Size mismatch, Tag: 32 bits, Field: 64 bits)

badcode.asl    394:         CreateQWordField (RSC3, \DWI1._MAX, MAX)
Remark   2089 -                         Object is not referenced ^  (Name is within method [REM1])

badcode.asl    395:         CreateBitField (RSC3, \DWI1._GRA, GRA)
Warning  3128 -             ResourceTag larger than Field ^  (Size mismatch, Tag: 32 bits, Field: 1 bit)

badcode.asl    395:         CreateBitField (RSC3, \DWI1._GRA, GRA)
Remark   2089 -                       Object is not referenced ^  (Name is within method [REM1])

badcode.asl    396:         CreateField (RSC3, \DWI1._MIF, 5, MIF)
Warning  3129 -         ResourceTag smaller than Field ^  (Size mismatch, Tag: 1 bit, Field: 5 bits)

badcode.asl    396:         CreateField (RSC3, \DWI1._MIF, 5, MIF)
Remark   2089 -                       Object is not referenced ^  (Name is within method [REM1])

badcode.asl    397:         CreateField (RSC3, \DWI1._RNG, 3, RNG2)
Warning  3129 -         ResourceTag smaller than Field ^  (Size mismatch, Tag: 2 bits, Field: 3 bits)

badcode.asl    397:         CreateField (RSC3, \DWI1._RNG, 3, RNG2)
Remark   2089 -                        Object is not referenced ^  (Name is within method [REM1])

badcode.asl    404:         Store (40, Local0)
Warning  3144 -                            ^ Method Local is set but never used (Local0)


Intel ACPI Component Architecture
ASL+ Optimizing Compiler version 20150717-64
Copyright (c) 2000 - 2015 Intel Corporation

Ignoring all errors, forcing AML file generation

ASL Input:     badcode.asl - 409 lines, 11588 bytes, 81 keywords
AML Output:    badcode.aml - 1195 bytes, 61 named objects, 20 executable opcodes

Compilation complete. 46 Errors, 28 Warnings, 19 Remarks, 16 Optimizations, 1 Constants Folded
+ diff badcode badcode.asl.result
+ '[' 1 -eq 0 ']'
+ exit 1

Version-Release number of selected component (if applicable): 20150717-1
 

How reproducible: run run-misc-tests.sh on ppc64. 


Additional info: badcode file generated is attached.
Comment 1 Al Stone 2015-09-11 11:40:13 EDT
Created attachment 1072596 [details]
Fix little-endian assumption in method name check

This patch fixes the issue; verified with a scratch build that passes the test case:

http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=2743354

The issue was that a routine was looking at the first character of a name to determine if it is an underscore or not.  If so, it's a predefined name, and the routine skips checking the number of arguments in a method call (which makes sense since they can be highly variable).  However, on ppc64 the check for an underscore fails since it looks at the wrong end of the integer holding the four bytes of method name.  This causes the check on number of arguments to be made, which then fails, and additional remarks are printed out that are false positives.  The patch fixes the check for underscore so that now the expected test results match the results we actually get.
Comment 2 Fedora Update System 2015-09-11 14:30:49 EDT
acpica-tools-20150818-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15642
Comment 3 Fedora Update System 2015-09-12 17:25:15 EDT
acpica-tools-20150818-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update acpica-tools'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15643
Comment 4 Fedora Update System 2015-09-13 00:20:18 EDT
acpica-tools-20150818-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update acpica-tools'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15642
Comment 5 Fedora Update System 2015-11-04 15:55:23 EST
acpica-tools-20150818-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 6 Fedora Update System 2015-11-04 17:24:03 EST
acpica-tools-20150818-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.