Skip to content

Commit

Permalink
[GR-58275] Public gate debuginfotest broken.
Browse files Browse the repository at this point in the history
PullRequest: graal/18857
  • Loading branch information
dominikmascherbauer authored and fniephaus committed Sep 23, 2024
2 parents 2d30342 + c6f5c2b commit de71b12
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ permissions:
jobs:
build-graalvm-linux:
name: /${{ matrix.env.PRIMARY }} ${{ matrix.env.GATE_TAGS }} JDK${{ matrix.env.JDK_VERSION }}
runs-on: ubuntu-20.04
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
timeout-minutes: 60
strategy:
fail-fast: false
Expand Down Expand Up @@ -120,7 +120,8 @@ jobs:
GATE_TAGS: "build,helloworld,native_unittests"
PRIMARY: "substratevm"
PIP_PACKAGES: "jsonschema==4.6.1"
- env:
- os: ubuntu-24.04
env:
JDK_VERSION: "latest"
GATE_TAGS: "build,debuginfotest"
PRIMARY: "substratevm"
Expand Down
10 changes: 5 additions & 5 deletions substratevm/mx.substratevm/testhello.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def test():
# print details of greeter types
exec_string = execute("ptype 'hello.Hello$NamedGreeter'")
rexp = [r"type = class hello\.Hello\$NamedGreeter : public hello\.Hello\$Greeter {",
fr"{spaces_pattern}private:",
fr"{spaces_pattern}private:" if major < 15 else None,
fr"{spaces_pattern}{compressed_pattern if isolates else ''}java\.lang\.String \*name;",
r"",
fr"{spaces_pattern}public:",
Expand All @@ -350,7 +350,7 @@ def test():
r"}"]

checker = Checker('ptype NamedGreeter', rexp)
checker.check(exec_string, skip_fails=False)
checker.check(exec_string, skip_fails=True)

exec_string = execute("ptype 'hello.Hello$Greeter'")
rexp = [r"type = class hello\.Hello\$Greeter : public java\.lang\.Object {",
Expand All @@ -360,7 +360,7 @@ def test():
r"}"]

checker = Checker('ptype Greeter', rexp)
checker.check(exec_string, skip_fails=False)
checker.check(exec_string, skip_fails=True)

exec_string = execute("ptype 'java.lang.Object'")
rexp = [r"type = class java\.lang\.Object : public _objhdr {",
Expand Down Expand Up @@ -495,7 +495,7 @@ def test():
exec_string = execute("ptype 'hello.Hello'")
rexp = [r"type = class hello\.Hello : public java\.lang\.Object {",
# ptype lists inlined methods although they are not listed with info func
fr"{spaces_pattern}private:",
fr"{spaces_pattern}private:" if major < 15 else None,
fr"{spaces_pattern}static void inlineA\(void\);",
fr"{spaces_pattern}static void inlineCallChain\(void\);",
fr"{spaces_pattern}static void inlineFrom\(void\);",
Expand All @@ -519,7 +519,7 @@ def test():
fr"{spaces_pattern}static void noInlineThis\(void\);",
r"}"]
checker = Checker('ptype hello.Hello', rexp)
checker.check(exec_string, skip_fails=False)
checker.check(exec_string, skip_fails=True)

# list methods matching regural expression "nline", inline methods are not listed because they lack a definition
# (this is true for C/C++ as well)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import sys
import unittest

import gdb

# add test directory to path to allow import of gdb_helper.py
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__))))

Expand Down Expand Up @@ -68,9 +70,13 @@ def test_manual_load(self):
gdb_set_param("auto-load python-scripts", backup_auto_load_param)

def test_manual_load_without_executable(self):
# Exceptions raised by gdb-debughelpers.py are printed to gdbs stdout as a string in GDB 14.2
# This behavior might change in newer gdb version that makes self.assertRaises usable
self.assertIn('AssertionError', gdb_execute("source gdb-debughelpers.py"))
if int(gdb.VERSION.split('.')[0]) < 15:
# Exceptions raised by gdb-debughelpers.py are printed to gdbs stdout as a string in GDB 14.2 and older
self.assertIn('AssertionError', gdb_execute("source gdb-debughelpers.py"))
else:
# This will raise a gdb.error in GDB 15 and newer, but it does not state AssertionError as its cause
# Needed for github debuginfotest gate
self.assertRaises(gdb.error, lambda: gdb_execute("source gdb-debughelpers.py"))

def test_auto_reload(self):
gdb_start()
Expand Down

0 comments on commit de71b12

Please sign in to comment.