mirror of
https://github.com/acpica/acpica/
synced 2025-01-01 07:04:27 +03:00
ACPI 5.0/ASLTS: Add common header output for descriptor suite.
Added function THDR that emits a common header and sets the filename via the __FILE__ operator. This function can be deployed across the entire ASLTS suite.
This commit is contained in:
parent
9d537381e4
commit
e9c96d5983
@ -226,6 +226,7 @@ Name(ERR5, 0) // Used to calculate the number of errors of root Method
|
||||
Name(ERR6, 0) // The number of failed root Methods (tests)
|
||||
Name(ERR7, 0) // The number of errors detected during the loading stage
|
||||
|
||||
Name(FNAM, 0) // Test filename
|
||||
|
||||
/*
|
||||
* Set parameters of current checking
|
||||
@ -284,6 +285,7 @@ Method(RST0) {
|
||||
CopyObject(0, ERR0)
|
||||
CopyObject(0, ERR1)
|
||||
CopyObject(0, ERR2)
|
||||
CopyObject(0, FNAM)
|
||||
}
|
||||
|
||||
// Reset current indicator of errors
|
||||
@ -357,6 +359,34 @@ Name(FLG6, 0)
|
||||
*/
|
||||
Name(ABUU, 0)
|
||||
|
||||
// Set global test filename
|
||||
Method(SETF, 1) {
|
||||
CopyObject(arg0, FNAM)
|
||||
}
|
||||
|
||||
/*
|
||||
* Test Header - Display common test header
|
||||
*
|
||||
* Arg0 - Name of test (RT25, etc)
|
||||
* Arg1 - Full Name of test ("Resource Descriptor Macro", etc.)
|
||||
* Arg2 - Test filename (via __FILE__ macro)
|
||||
*/
|
||||
Method (THDR, 3)
|
||||
{
|
||||
// Save the test filename in the FNAM global
|
||||
SETF (Arg2)
|
||||
|
||||
// Build output string and store to debug object
|
||||
Concatenate ("TEST: ", Arg0, Local1)
|
||||
Concatenate (Local1, ", ", Local2)
|
||||
Concatenate (Local2, Arg1, Local3)
|
||||
Concatenate (Local3, " (", Local4)
|
||||
Concatenate (Local4, Arg2, Local5)
|
||||
Concatenate (Local5, ")", Local6)
|
||||
|
||||
Store (Local6, Debug)
|
||||
}
|
||||
|
||||
|
||||
// Report completion of root Method
|
||||
Method(RPT0) {
|
||||
@ -645,6 +675,7 @@ Method(PK03, 2)
|
||||
* arg5 - first value (usually, received value)
|
||||
* arg6 - second value (usually, expected value)
|
||||
*/
|
||||
|
||||
Method(err, 7)
|
||||
{
|
||||
Store(0, Local3)
|
||||
@ -711,9 +742,9 @@ Method(err, 7)
|
||||
|
||||
ERP0(arg1, arg2, Local4, Local3, Local5)
|
||||
|
||||
Store("(r):", Debug)
|
||||
Store("**** Actual Result:", Debug)
|
||||
Store(arg5, Debug)
|
||||
Store("(e):", Debug)
|
||||
Store("**** Expected Result:", Debug)
|
||||
Store(arg6, Debug)
|
||||
Store("---------- END.", Debug)
|
||||
|
||||
@ -760,7 +791,12 @@ Method(ERP0, 5)
|
||||
|
||||
// Error
|
||||
|
||||
if (LEqual(arg0, zFFF)) {
|
||||
if (LNotEqual (FNAM, 0))
|
||||
{
|
||||
// Use global filename, set via SETF
|
||||
Store (FNAM, Local1)
|
||||
}
|
||||
elseif (LEqual(arg0, zFFF)) {
|
||||
|
||||
// ATTENTION: dont use zFFF in tests other than TCLD
|
||||
|
||||
|
@ -981,7 +981,9 @@ Method(RT1b)
|
||||
{
|
||||
Name(ts, "RT1b")
|
||||
|
||||
Store("TEST: RT1b, Concatenate two resource templates", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Concatenate two resource templates", __FILE__)
|
||||
|
||||
// Calculate the checksum for the target first
|
||||
|
||||
|
@ -171,7 +171,11 @@ Method(RT04)
|
||||
{
|
||||
Name(ts, "RT04")
|
||||
|
||||
Store("TEST: RT04, Start/End Dependent Function Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Start/End DependentFunction Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 14, "p406", p406, p407)
|
||||
}
|
||||
|
@ -181,7 +181,11 @@ Method(RT03)
|
||||
{
|
||||
Name(ts, "RT03")
|
||||
|
||||
Store("TEST: RT03, DMA Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "DMA Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 27, "p404", p404, p405)
|
||||
|
||||
|
@ -501,7 +501,11 @@ Method(RT0d)
|
||||
{
|
||||
Name(ts, "RT0d")
|
||||
|
||||
Store("TEST: RT0d, DWord IO Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "DWordIo Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 37, "p418", p418, p419)
|
||||
|
||||
|
@ -1008,7 +1008,11 @@ Method(RT11)
|
||||
{
|
||||
Name(ts, "RT11")
|
||||
|
||||
Store("TEST: RT11, DWord Memory Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "DWordMemory Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 89, "p426", p426, p427)
|
||||
|
||||
|
@ -412,7 +412,11 @@ Method(RT15)
|
||||
{
|
||||
Name(ts, "RT15")
|
||||
|
||||
Store("TEST: RT15, DWord Space Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "DWordSpace Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 27, "p42e", p42e, p42f)
|
||||
|
||||
|
@ -619,7 +619,11 @@ Method(RT0f)
|
||||
{
|
||||
Name(ts, "RT0f")
|
||||
|
||||
Store("TEST: RT0f, Extended IO Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "ExtendedIo Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 34, "p422", p422, p423)
|
||||
|
||||
|
@ -1296,7 +1296,11 @@ Method(RT13)
|
||||
{
|
||||
Name(ts, "RT13")
|
||||
|
||||
Store("TEST: RT13, Extended Memory Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "ExtendedMemory Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 86, "p42a", p42a, p42b)
|
||||
|
||||
|
@ -451,7 +451,11 @@ Method(RT17)
|
||||
{
|
||||
Name(ts, "RT17")
|
||||
|
||||
Store("TEST: RT17, Extended Space Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "ExtendedSpace Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 24, "p432", p432, p433)
|
||||
|
||||
|
@ -79,7 +79,11 @@ Method(RT20)
|
||||
{
|
||||
Name(ts, "RT20")
|
||||
|
||||
Store("TEST: RT20, Fixed DMA Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "FixedDMA Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 8, "p450", p450, p451)
|
||||
|
||||
|
@ -64,7 +64,11 @@ Method(RT06)
|
||||
{
|
||||
Name(ts, "RT06")
|
||||
|
||||
Store("TEST: RT06, Fixed IO Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "FixedIO Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 2, "p40a", p40a, p40b)
|
||||
|
||||
|
@ -72,7 +72,11 @@ Method(RT21)
|
||||
{
|
||||
Name(ts, "RT21")
|
||||
|
||||
Store("TEST: RT21, GpioInt Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "GpioInt Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 2, "p452", p452, p453)
|
||||
|
||||
|
@ -73,7 +73,11 @@ Method(RT22)
|
||||
{
|
||||
Name(ts, "RT22")
|
||||
|
||||
Store("TEST: RT22, GpioIO Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "GpioIO Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 2, "p454", p454, p455)
|
||||
|
||||
|
@ -68,7 +68,11 @@ Method(RT23)
|
||||
{
|
||||
Name(ts, "RT23")
|
||||
|
||||
Store("TEST: RT23, I2cSerialBus Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "I2cSerialBus Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 2, "p456", p456, p457)
|
||||
|
||||
|
@ -550,7 +550,11 @@ Method(RT18)
|
||||
{
|
||||
Name(ts, "RT18")
|
||||
|
||||
Store("TEST: RT18, Interrupt() Interrupt Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Interrupt Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 23, "p434", p434, p435)
|
||||
|
||||
|
@ -80,7 +80,11 @@ Method(RT05)
|
||||
{
|
||||
Name(ts, "RT05")
|
||||
|
||||
Store("TEST: RT05, IO Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "IO Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 3, "p408", p408, p409)
|
||||
|
||||
|
@ -137,7 +137,11 @@ Method(RT01)
|
||||
{
|
||||
Name(ts, "RT01")
|
||||
|
||||
Store("TEST: RT01, IRQ() Interrupt Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "IRQ Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 18, "p400", p400, p401)
|
||||
|
||||
|
@ -127,7 +127,11 @@ Method(RT02)
|
||||
{
|
||||
Name(ts, "RT02")
|
||||
|
||||
Store("TEST: RT02, IRQNoFlags() Interrupt Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "IRQNoFlags Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 18, "p402", p402, p403)
|
||||
}
|
@ -94,7 +94,11 @@ Method(RT08)
|
||||
{
|
||||
Name(ts, "RT08")
|
||||
|
||||
Store("TEST: RT08, Memory24() Memory Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Memory24 Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 3, "p40e", p40e, p40f)
|
||||
|
||||
|
@ -92,7 +92,11 @@ Method(RT0a)
|
||||
{
|
||||
Name(ts, "RT0a")
|
||||
|
||||
Store("TEST: RT0a, Memory32() Memory Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Memory32 Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 3, "p412", p412, p413)
|
||||
|
||||
|
@ -81,7 +81,11 @@ Method(RT0b)
|
||||
{
|
||||
Name(ts, "RT0b")
|
||||
|
||||
Store("TEST: RT0b, Memory32Fixed() Memory Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Memory32Fixed Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 3, "p414", p414, p415)
|
||||
|
||||
|
@ -668,7 +668,11 @@ Method(RT0c)
|
||||
{
|
||||
Name(ts, "RT0c")
|
||||
|
||||
Store("TEST: RT0c, QWord IO Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "QWordIO Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 37, "p416", p416, p417)
|
||||
|
||||
|
@ -1294,7 +1294,11 @@ Method(RT10)
|
||||
{
|
||||
Name(ts, "RT10")
|
||||
|
||||
Store("TEST: RT10, QWord Memory Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "QWordMemory Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 89, "p424", p424, p425)
|
||||
|
||||
|
@ -512,7 +512,11 @@ Method(RT14)
|
||||
{
|
||||
Name(ts, "RT14")
|
||||
|
||||
Store("TEST: RT14, QWord Space Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "QWordSpace Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 27, "p42c", p42c, p42d)
|
||||
|
||||
|
@ -158,7 +158,11 @@ Method(RT19)
|
||||
{
|
||||
Name(ts, "RT19")
|
||||
|
||||
Store("TEST: RT19, Generic Register Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Register Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 13, "p436", p436, p437)
|
||||
|
||||
|
@ -2128,7 +2128,11 @@ Method(RT1a)
|
||||
{
|
||||
Name(ts, "RT1a")
|
||||
|
||||
Store("TEST: RT1a, Resource To Buffer Conversion Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Resource To Buffer Conversion Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 3, "p438", p438, p439)
|
||||
|
||||
@ -2138,7 +2142,9 @@ Method(RT1c)
|
||||
{
|
||||
Name(ts, "RT1c")
|
||||
|
||||
Store("TEST: RT1c, Resource Conversion Macros complex test", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Resource Conversion Macros complex test", __FILE__)
|
||||
|
||||
Name (RT00, ResourceTemplate () {
|
||||
IRQ (Level, ActiveHigh, Exclusive, IRQ0) {0}
|
||||
|
@ -71,7 +71,11 @@ Method(RT24)
|
||||
{
|
||||
Name(ts, "RT24")
|
||||
|
||||
Store("TEST: RT24, SpiSerialBus Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "SpiSerialBus Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 2, "p458", p458, p459)
|
||||
|
||||
|
@ -71,8 +71,11 @@ Method(RT25)
|
||||
{
|
||||
Name(ts, "RT25")
|
||||
|
||||
Store("TEST: RT25, UartSerialBus Resource Descriptor Macro", Debug)
|
||||
Store(__FILE__, Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "UartSerialBus Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 2, "p45A", p45A, p45B)
|
||||
|
||||
|
@ -150,7 +150,11 @@ Method(RT09)
|
||||
{
|
||||
Name(ts, "RT09")
|
||||
|
||||
Store("TEST: RT09, Long Vendor Resource Descriptor", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Long Vendor Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 7, "p410", p410, p411)
|
||||
|
||||
|
@ -85,7 +85,11 @@ Method(RT07)
|
||||
{
|
||||
Name(ts, "RT07")
|
||||
|
||||
Store("TEST: RT07, Short Vendor Resource Descriptor", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "Short Vendor Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 8, "p40c", p40c, p40d)
|
||||
}
|
||||
|
@ -329,7 +329,11 @@ Method(RT12)
|
||||
{
|
||||
Name(ts, "RT12")
|
||||
|
||||
Store("TEST: RT12, Word Bus Number Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "WordBusNumber Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 25, "p428", p428, p429)
|
||||
|
||||
|
@ -454,7 +454,11 @@ Method(RT0e)
|
||||
{
|
||||
Name(ts, "RT0e")
|
||||
|
||||
Store("TEST: RT0e, Word IO Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "WordIO Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 37, "p420", p420, p421)
|
||||
|
||||
|
@ -348,7 +348,11 @@ Method(RT16)
|
||||
{
|
||||
Name(ts, "RT16")
|
||||
|
||||
Store("TEST: RT16, Word Space Resource Descriptor Macro", Debug)
|
||||
// Emit test header, set the filename
|
||||
|
||||
THDR (ts, "WordSpace Resource Descriptor Macro", __FILE__)
|
||||
|
||||
// Main test case for packages above
|
||||
|
||||
m330(ts, 27, "p430", p430, p431)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user