diff --git a/tests/halmodule/halquery/expected b/tests/halmodule/halquery/expected index f96b440db5a..d66fb4afd09 100644 --- a/tests/halmodule/halquery/expected +++ b/tests/halmodule/halquery/expected @@ -46,7 +46,7 @@ invert.0 {'haltype': 'function', 'name': 'invert.0', 'comp': 'invert', 'comp_id' or2.0 {'haltype': 'function', 'name': 'or2.0', 'comp': 'or2', 'comp_id': 'ID', 'users': 1, 'reentrant': False} xor2.0 {'haltype': 'function', 'name': 'xor2.0', 'comp': 'xor2', 'comp_id': 'ID', 'users': 1, 'reentrant': False} # Threads -testthread {'haltype': 'thread', 'name': 'testthread', 'comp': '__testthread', 'comp_id': 'ID', 'priority': 0, 'period': 1000000, 'functions': [{'haltype': 'threadfunction', 'name': 'and2.0', 'index': 0, 'is_init': False}, {'haltype': 'threadfunction', 'name': 'or2.0', 'index': 1, 'is_init': False}, {'haltype': 'threadfunction', 'name': 'xor2.0', 'index': 2, 'is_init': False}]} +testthread {'haltype': 'thread', 'name': 'testthread', 'comp': '__testthread', 'comp_id': 'ID', 'priority': 'PRIO', 'period': 1000000, 'functions': [{'haltype': 'threadfunction', 'name': 'and2.0', 'index': 0, 'is_init': False}, {'haltype': 'threadfunction', 'name': 'or2.0', 'index': 1, 'is_init': False}, {'haltype': 'threadfunction', 'name': 'xor2.0', 'index': 2, 'is_init': False}]} # Signal pins and2.0.out {'haltype': 'pin', 'name': 'and2.0.out', 'type': , 'dir': , 'value': False, 'alias': None, 'signal': 'net-xor-a', 'comp': 'and2', 'comp_id': 'ID'} xor2.0.in0 {'haltype': 'pin', 'name': 'xor2.0.in0', 'type': , 'dir': , 'value': False, 'alias': None, 'signal': 'net-xor-a', 'comp': 'xor2', 'comp_id': 'ID'} @@ -65,4 +65,4 @@ Param: {'haltype': 'parameter', 'name': 'invert.0.deadband', 'type': Signal: {'haltype': 'signal', 'name': 'net-output', 'type': , 'value': False, 'writers': 1, 'readers': 0, 'bidirs': 0, 'driver': 'xor2.0.out'} Component: {'haltype': 'component', 'name': 'and2', 'type': , 'id': 'ID', 'pid': 0, 'ready': True, 'insmod': 'count=1'} Function: {'haltype': 'function', 'name': 'xor2.0', 'comp': 'xor2', 'comp_id': 'ID', 'users': 1, 'reentrant': False} -Thread: {'haltype': 'thread', 'name': 'testthread', 'comp': '__testthread', 'comp_id': 'ID', 'priority': 0, 'period': 1000000, 'functions': [{'haltype': 'threadfunction', 'name': 'and2.0', 'index': 0, 'is_init': False}, {'haltype': 'threadfunction', 'name': 'or2.0', 'index': 1, 'is_init': False}, {'haltype': 'threadfunction', 'name': 'xor2.0', 'index': 2, 'is_init': False}]} +Thread: {'haltype': 'thread', 'name': 'testthread', 'comp': '__testthread', 'comp_id': 'ID', 'priority': 'PRIO', 'period': 1000000, 'functions': [{'haltype': 'threadfunction', 'name': 'and2.0', 'index': 0, 'is_init': False}, {'haltype': 'threadfunction', 'name': 'or2.0', 'index': 1, 'is_init': False}, {'haltype': 'threadfunction', 'name': 'xor2.0', 'index': 2, 'is_init': False}]} diff --git a/tests/halmodule/halquery/halquerytest.py b/tests/halmodule/halquery/halquerytest.py index f2a88f9fcee..8b0c4255b9f 100755 --- a/tests/halmodule/halquery/halquerytest.py +++ b/tests/halmodule/halquery/halquerytest.py @@ -14,6 +14,13 @@ def fix_comp_id(d): d['comp_id'] = "ID" return fix_enum_numbers(d) +# The thread priority is 0 without realtime and the scheduler priority +# with it, so mask it as well. +def fix_thread(d): + if 'priority' in d: + d['priority'] = "PRIO" + return fix_comp_id(d) + def fix_id(d): if 'id' in d: d['id'] = "ID" @@ -43,7 +50,7 @@ def fix_id(d): print("# Threads") for n,v in hal.query.threads().items(): - print(n, fix_comp_id(v)) + print(n, fix_thread(v)) print("# Signal pins") for n,v in hal.query.signalpins('net-xor-a').items(): @@ -74,4 +81,4 @@ def fix_id(d): print("Signal:", fix_enum_numbers(hal.query.signal('net-output'))) print("Component:", fix_id(hal.query.comp('and2'))) print("Function:", fix_comp_id(hal.query.funct('xor2.0'))) -print("Thread:", fix_comp_id(hal.query.thread('testthread'))) +print("Thread:", fix_thread(hal.query.thread('testthread'))) diff --git a/tests/stale-motion-status/test-ui.py b/tests/stale-motion-status/test-ui.py index 7387363da4a..edd6e09b2d2 100755 --- a/tests/stale-motion-status/test-ui.py +++ b/tests/stale-motion-status/test-ui.py @@ -74,11 +74,16 @@ def settle(what, done): sys.exit(1) time.sleep(0.001) +# slowkins busy waits most of a servo period, so a realtime host may +# report a late period; only the other errors count. +def error(err): + if err and "Unexpected realtime delay" not in err[1]: + errors.append(err[1]) + errors = [] while True: err = e.poll() - if err: - errors.append(err[1]) + error(err) s.poll() if s.interp_state == linuxcnc.INTERP_IDLE: break @@ -89,7 +94,7 @@ def settle(what, done): err = e.poll() while err: - errors.append(err[1]) + error(err) err = e.poll() for msg in failures + errors: diff --git a/tests/workplane-retain/test-ui.py b/tests/workplane-retain/test-ui.py index ae82adc694c..c9797a99cce 100755 --- a/tests/workplane-retain/test-ui.py +++ b/tests/workplane-retain/test-ui.py @@ -23,13 +23,16 @@ def say(*a): c.home(-1) l.wait_for_home(joints=[1, 1, 1, 1, 0, 0, 0, 0, 0]) +# A realtime host reports a late servo period on the error channel; +# that says nothing about the plane, so leave it out. def errors(): msgs = [] while True: m = e.poll() if not m: return msgs - msgs.append(m[1]) + if "Unexpected realtime delay" not in m[1]: + msgs.append(m[1]) def mdi(*cmds): c.mode(linuxcnc.MODE_MDI)