From 69b6a3c50e03fbac81103b7ed47892545d264e8c Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Mon, 26 Aug 2019 10:40:58 -0700 Subject: [PATCH 1/2] ASLTS: add option to only execute data table compiler tests Signed-off-by: Erik Schmauss --- tests/aslts.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/aslts.sh b/tests/aslts.sh index 5849c7f4a..0e6071cf3 100755 --- a/tests/aslts.sh +++ b/tests/aslts.sh @@ -13,6 +13,7 @@ TEST_CASES= TEST_MODES= REBUILD_TOOLS=yes BINCOMPONLY=no +DATATABLEONLY=no EXECONLY=no usage() { @@ -25,6 +26,7 @@ usage() { echo " -u: Do not force rebuilding of ACPICA utilities (acpiexec, iasl)" echo " -e: Perform the execution of aml files and omit binary comparison of regular aml and disassembled aml file." echo " -b: Only perform binary comparison of regular aml and disasssembled aml file" + echo " -d: Only execute data table compiler/disassembler test" echo "" echo "Available test modes:" @@ -151,6 +153,10 @@ run_aslts() { run_compiler_template_test + if [ "x$DATATABLEONLY" = "xyes" ]; then + return 0 + fi; + if [ "x$TEST_MODES" = "x" ]; then TEST_MODES="n32 n64 o32 o64" fi @@ -189,7 +195,7 @@ RESET_SETTINGS INIT_ALL_AVAILABLE_CASES INIT_ALL_AVAILABLE_MODES -while getopts "c:m:ueb" opt +while getopts "c:m:uebd" opt do case $opt in b) @@ -205,6 +211,10 @@ do TEST_CASES="$OPTARG $TEST_CASES" fi ;; + d) + DATATABLEONLY=yes + echo "Running only data table test" + ;; e) EXECONLY=yes echo "Running tests without binary comparisons" From 6eec8ad3cc97ac584dc8cba408c2ffcdd0b5bffa Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Wed, 28 Aug 2019 17:10:29 -0700 Subject: [PATCH 2/2] iASL: DT: fix label scanner by creating a DT_TABLE_UNIT instead of a string Signed-off-by: Erik Schmauss --- source/compiler/dtcompilerparser.l | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/compiler/dtcompilerparser.l b/source/compiler/dtcompilerparser.l index 3a8a0b6f8..28dcf6af8 100644 --- a/source/compiler/dtcompilerparser.l +++ b/source/compiler/dtcompilerparser.l @@ -238,7 +238,10 @@ CommentField {LabelName}{WhiteSpace}*:{WhiteSpace}{Comment}?$ int size = strlen (DtCompilerParsertext); s=UtLocalCacheCalloc (size + 1); AcpiUtSafeStrncpy (s, DtCompilerParsertext, size + 1); - DtCompilerParserlval.s = s; + DtCompilerParserlval.u = (DT_TABLE_UNIT *) UtLocalCacheCalloc (sizeof (DT_TABLE_UNIT)); + DtCompilerParserlval.u->Value = s; + DtCompilerParserlval.u->Line = DtCompilerParserlineno; + DtCompilerParserlval.u->Column = DtCompilerParsercolumn; DtLabelByteOffset = DtCompilerParserByteOffset; DbgPrint (ASL_PARSE_OUTPUT, "Label: %s\n", s); return (DT_PARSEOP_LABEL);