259 Commits

Author SHA1 Message Date
Erik Schmauss
12799888ae ASLTS: change M380-M387, M390, M391 to use the __LINE__ macro
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-02-16 13:38:43 -08:00
Erik Schmauss
671b9476f6 ASLTS: change CH04 to emit line numbers instead of index
This is done by replacing hardcorded index values with __LINE__ macro

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-02-16 12:37:39 -08:00
Erik Schmauss
a32eebec57 ASLTS: change formatting of ERR to emit decimal line numbers
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-02-14 16:51:16 -08:00
Erik Schmauss
e4af07e9b9 ASLTS: adding macros to ERR functions
This change replaces the first parameter of ERR with __METHOD__ in
bdemo testcases and replaces the third parameter of ERR with
__LINE__. The __METHOD macro evaluates to the current method and
__LINE__ evaluates to the current line number during compilation. By
doing these macros help clarify error messages in ASLTS.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-02-14 16:51:09 -08:00
Robert Moore
8faf6fca44 Integrate package handling with module-level code
This change completes the integration of the recent changes to
package object handling with the module-level code support.

For AcpiExec, the -ep flag is removed.
2018-02-07 12:47:58 -08:00
Robert Moore
1de399b3a5 ASLTS: Remove octal constants from common script
Some versions of bash, etc. will type a local variable as an
octal if initialization values are specified in octal.
2018-01-18 08:03:20 -08:00
Erik Schmauss
fef09f31c7 ASLTS: replace TS with __METHOD__ to improve style
This removes most of the TS objects which is used to store method names.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-01-04 14:15:36 -08:00
Robert Moore
c94962e710 ASLTS: Update all copyrights to 2018
All ASL code in the test suite.
2018-01-04 10:12:49 -08:00
Robert Moore
4ca62a8141 ASLTS: Automated cleanup, no functional changes
Mostly trailing spaces and extra lines at EOF.
2018-01-04 09:48:44 -08:00
Erik Schmauss
407244a52d ASLTS: converting files to ASL plus with converter
functional/control test case has been left unconverted for
readability of deeply nested control statements (if, switch, while)

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-11-10 14:36:41 -08:00
Erik Schmauss
754280d5d1 ASLTS: fix parsing of memory statistics
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-10-09 14:36:06 -07:00
[devel-bounces@acpica.org]
78ed290b17 ASLTS: provide proper PATH for acpibin in tests
Recent versions of ASLTS now use the acpibin utility, much like they
use acpiexec.  However, when use of acpibin was added, it was not
treated like acpiexec and was assumed to exist in whatever PATH a user
had set when running the tests.  When trying to use ASLTS in a very
pristine environment (i.e., no previous version of ACPICA user space
tools is available), portions of the test suite will produce false
failures because acpibin cannot be found and run.

This patch fixes ASLTS so that the use of acpibin is treated exactly
the same as acpiexec -- an environment variable must be defined (in
this case, $acpibin) with the location of the executable, aslts.sh
makes sure a value for the variable is set, Do uses $acpibin (instead
of assuming acpibin exists in a user's PATH), and the various bits
of documentation are updated to note the new environment variable.

Signed-off-by: Al Stone <ahs3@redhat.com>
2017-09-27 15:36:28 -07:00
Erik Schmauss
7f2ae61bda ASLTS: adding expected compilation failure flags for recursive methods that create named objects
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-09-15 16:51:18 -07:00
Erik Schmauss
9bebbe8d8a Makefile: continue compiling other test cases after failure
This change continues compilation of ASLTS test cases even
if one of the test cases fail. This is helpful when deliberate
compilation changes are made to iASL. When these compiler changes
occur, it is helpful for the test suite to run all the way to
completion.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-09-15 16:43:46 -07:00
Erik Schmauss
badfdbf54c ASLTS: Do: do not perform binary compare unless both files exist
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-09-15 16:34:30 -07:00
Erik Schmauss
1ed56f3402 ASLTS: script: fix ADD_FLAGS parameter for compilation and conversion targets
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-09-15 15:00:09 -07:00
Erik Schmauss
e3665e34bd ASLTS: add a 60 second timeout for loops
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-09-08 14:04:23 -07:00
Erik Schmauss
f6d83487a7 ASLTS: make stylistic adjustments to pass converter test
MT_MUTEX/DYNOBJ - converter does not support nested comments.
      Remove the nested comment so that it is just a single-line comment
EXC - converter does not currently support #include directives.
      replace these with ASL include statements.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-09-08 13:47:37 -07:00
Erik Schmauss
d6583fe044 ASLTS: add converter test sequence and rename all .dsl files to .asl
This is similar to the ASLTS disassembler test sequence.
The converter test sequence converts each test case using iasl -ca flag
and then recompiles using flags from a normal test case compilation.
After recompilation, normally compiled AML is compared with the
converted and recompiled AML.

Converter test sequence removes all .dsl files after testing. Because
of this, all .dsl files that belong in the ASLTS directory needs to be
renamed as .asl.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-09-08 13:47:37 -07:00
Erik Schmauss
f306328d75 ASLTS: asltsrun: add functionality to save the output from Do 2 to the result directory
This is a convenient way to look at the difference between the current and
previous ASLTSL run if there exists a difference.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-08-31 16:53:36 -07:00
Erik Schmauss
c5adbb87d2 ASLTS: scripts: trivial syntax edits, no functional change
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-08-31 11:15:46 -07:00
Erik Schmauss
2e492ed995 ASLTS: script: removing debug messages, no functional change
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-08-30 15:05:37 -07:00
Erik Schmauss
be0c7aa577 ASLTS: Do: adding binary comparison for the aslplus and aslminus targets
This is intended to be used as a part of the disassembler test
sequence in order to ensure that compiling, disassembling and
recompiling has the same effect as simply compiling the ASL files.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-08-30 15:05:37 -07:00
Erik Schmauss
d79775d864 ASLTS: script: add targets for disassembler test sequence
The disassembler test sequence is as follows:

Given a test case ASL file, it will compile, disassemble and re-compile.
The above procedures result in an AML file. This should be then compared
to a file that is compiled by ASLTS for a normal compilation by using
the acpibin utility (not yet implemented).

This sequence of commands ensures that the disassembler does not inject
any unwanted code in the AML.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-08-30 15:05:37 -07:00
Erik Schmauss
6c50a9e3b5 ASLTS: Makefile: remove compile-disassemble-recompile from install_all_modes_of_test_case
Compile-disassemble-recompile will be in different targets. This means that
the OPT argument is no longer needed in install_all_modes_of_test_case.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-08-30 15:05:37 -07:00
Erik Schmauss
05bc03a5df ASLTS: Makefile: splitting iASL flags to output and non-output based flags
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-08-30 15:05:37 -07:00
Erik Schmauss
ac8f111efc ASLTS: Do: moving NPARAM checking outside of run_asl_compiler for cleanliness
This NPARAM counts the amount of enabled test cases given to the Do script

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-08-30 15:05:37 -07:00
Lv Zheng
5a52881149 iasl: Move aslversion determination logic from Makefile.def to Do script 2017-08-30 15:05:37 -07:00
Lv Zheng
bf8ee64902 ASLTS: Split install target into install_n32/n64/s32/s64
This patch splits install target into install_n32/n64/s32/s64 targets
so that they can be invoked from "Do" script separately. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-08-30 15:05:37 -07:00
Lv Zheng
66b85dc874 ASLTS: Allow cases/modes to be specified for aslts compile
This patch adds support in Do to allow test cases/modes to be specified
in "Do 0" mode - build aslts aml test cases. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-08-30 15:05:37 -07:00
Lv Zheng
421e5d9439 ASLTS: Convert make_install into make_target
Convert make_install into make_target so that other targets can be used
in Do script. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-08-30 15:05:37 -07:00
Erik Schmauss
eab4fc423b ASLTS: exc: change test case to allow implicit conversion of strings with "0x" to hex
The ACPI spec's definition of implicit conversion does not allow
'0x' within strings that are converted to integers. Without '0x'
the number being converted could be mistaken as a decimal number.
Instead we are allowing with 0x or no 0x and both versions are
implicitly converted to hex.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-08-10 14:35:01 -07:00
Robert Moore
c89d33e730 Tests: Fix an incorrect argument count
The _ERR method requires three arguments, not two.
Eliminates a warning message.
2017-07-27 13:31:38 -07:00
Erik Schmauss
e5bbb5455f ASLTS: resolving conflict from rebasing
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-21 17:01:45 -07:00
Erik Schmauss
be18b4ea05 ASLTS: CH03 and CH04 is intended to take line numbers as arguments rather than a number indicating the "index of error".
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-21 16:54:23 -07:00
Erik Schmauss
a73816a2a2 ASLTS: changing the third argument of ERR to __LINE__ to print line numbers instead of indices.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-21 16:54:23 -07:00
Erik Schmauss
6f3586d458 ASLTS: getting rid of unnecessary error reporting.
This error information is redundant.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-21 16:54:23 -07:00
Erik Schmauss
8c09a8784e ASLTS: descriptor: update test buffers to include shared bit in V2 descriptors
These tests compare a resource descriptor and an equivalent buffer to ensure
proper resource descriptor compilation. The buffer does not account for the
shared bit for V2 resource descriptors (see section 6.4.3.8.2.x in the ACPI
6.2 spec). This commit changes this test buffer to include the shared bit
(the 3rd bit of the 6th byte of V2 resource descriptors). The specification
is expected to reflect these changes (sections 6.4.3.8.2.1, 6.4.3.8.2.2, and
6.4.3.8.2.3).

Updated buffers include buffers equivalent to I2cSearialBusv2, SpiSerialBusv2,
and UartSerialBusv2

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-07-17 14:29:33 -07:00
Erik Schmauss
86bcb87e3c ASLTS: External: adding testcases from bz1389 by racerrehabman
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-06-09 10:50:18 -07:00
Erik Schmauss
a90d78b8d1 ASLTS: misc: adding ASL/ASL+ converter sample
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-31 10:29:50 -07:00
Robert Moore
84416b3e45 Merge pull request #252 from zetalog/acpica-aslts
Acpica aslts
2017-05-25 11:01:04 -07:00
Erik Schmauss
8cc341b3dd ASLTS: reverse the order of definition block declarations to test for a corner case
Reversing the order of defintion block declarations exposed an
issue in the compiler namespace loading. This issue has been fixed
and this change exercises the code involved in the bug fix.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-09 10:34:11 -07:00
Lv Zheng
49f041a2f1 ASLTS: exc_result2: Fix old m689 breakage (exceptional)
When tests are meant to return exceptions, proceeding causes unexpected
number of exceptions left. This patch fixes such issues by interrupting the
tests when exception is expected. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-05-03 15:06:29 +08:00
Lv Zheng
2f79a52433 ASLTS: rstore: Fix old m689 breakage (store matrix)
The p6a0 store matrix is used to indicate "Stroe" allowable types while
b67a contains indexes to this matrix.
1. Row[3] is used for Package target,
   Row[4] is used for Method target,
   Row[5] is used for Non-computational data (Device/Event/...) target.
2. Col[2] is used for FIXED fields result,
   Col[3] is used for Computational data (Integer/String/Buffer) result,
   Col[4] is used for Package result.
As it is not possible to:
1. Store(Package/Method/Noncomputation, Field/Computationl/Package)
2. Store(Method/Noncomputation, Field/Computational)
We must change the matrix to reflect the validated Windows behavior. By
doing so, several m689 failures are fixed. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-05-03 15:06:29 +08:00
Lv Zheng
a12a7052a1 ASLTS: region: Fix old m702 breakage
In m702 tests, there are 2 lines trying to exclude 2 test cases, while
the test cases should be valid. OTOH, GeneralPurposeIo test is not
correct, it shouldn't validate the region access result as we don't
implement fully functioning region handlers in acpiexec. This patch fixes
these breakage. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-05-03 15:06:29 +08:00
Lv Zheng
8d8926ae4d ASLTS: reference: Fix old m34d breakage
Store(Integer/String/Buffer, Package) results in AE_AML_TARGET_TYPE. This
patch fixes ASLTS failures by removing these invalid test cases.

Note that m34d is not a kind of coverage test that also validates if
invalid Store test cases can trigger exceptions, it only contains valid
Store test cases where the results' ObjectType can be compared, so we
should just remove the invalid test cases instead of adding exception
check. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-05-03 15:06:29 +08:00
Lv Zheng
14a1c31432 ASLTS: scripts: Fix directory name of Identity2MS tests
This patch fixes the Identity2MS collection's directory name of its
sub-test-cases in order to fix unexpected error occurred to the following
command:
  aslts.sh -u -m n32 -c extra_aslts
The Identity2MS test cases are located at Identity2MS/abbu, rather than
Identity2MS/extra or Identity2MS/extra_aslts. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-05-03 15:06:29 +08:00
Erik Schmauss
979346922f ASLTS: get rid of External declaration for _ERR because it is a redefinition of _ERR.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-02 14:41:06 -07:00
Erik Schmauss
3dda379ed4 ASLTS: fix spelling error
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-02 13:50:55 -07:00
Erik Schmauss
34bc64edf0 ASLTS: adding external statement test case so that they can be run by aslts.sh
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2017-05-02 12:42:52 -07:00