Skip to content

Commit afe019c

Browse files
committed
[lldb][test][AArch64] Regex match field values in register test
As these are flags they can be set or not depending on what the system libraries did prior to loading the program.
1 parent 1c764b9 commit afe019c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lldb/test/API/commands/register/register/register_command/TestRegisters.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,11 +628,16 @@ def test_register_read_fields(self):
628628
self.common_setup()
629629

630630
# N/Z/C/V bits will always be present, so check only for those.
631-
self.expect("register read cpsr", substrs=["= (N = 0, Z = 1, C = 1, V = 0"])
632-
self.expect("register read fpsr", substrs=["= (QC = 0, IDC = 0, IXC = 0"])
633-
# AHP/DN/FZ/RMode always present, others may vary.
634631
self.expect(
635-
"register read fpcr", substrs=["= (AHP = 0, DN = 0, FZ = 0, RMode = RN"]
632+
"register read cpsr",
633+
patterns=["= \(N = [0|1], Z = [0|1], C = [0|1], V = [0|1]"],
634+
)
635+
self.expect(
636+
"register read fpsr", patterns=["= \(QC = [0|1], IDC = [0|1], IXC = [0|1]"]
637+
)
638+
# AHP/DN/FZ always present, others may vary.
639+
self.expect(
640+
"register read fpcr", patterns=["= \(AHP = [0|1], DN = [0|1], FZ = [0|1]"]
636641
)
637642

638643
# Should get enumerator descriptions for RMode.

0 commit comments

Comments
 (0)