Skip to content

Commit

Permalink
tests: add a test case for infinite recursion
Browse files Browse the repository at this point in the history
Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
  • Loading branch information
d-tatianin committed May 26, 2024
1 parent 073ab9b commit 37d4671
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test-cases/infinite-recursion.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Name: Infinite recursion eventually ends
// Expect: int => 0

DefinitionBlock ("", "DSDT", 2, "uTEST", "TESTTABL", 0xF0F0F0F0)
{
Name (MAIN, 0xDEADBEEF)
Name (ITER, 0)

Method (HANG) {
ITER++
HANG()
}

HANG()
Printf("Recursed %o times before stopping", ToDecimalString(ITER))

If (ITER > 64) {
MAIN = 0
} Else {
Debug = "Recursion depth was too small"
}
}

0 comments on commit 37d4671

Please sign in to comment.