adjusted test due to hidden operand dependencies

This commit is contained in:
JanLJL
2020-01-17 08:13:15 +01:00
parent 6d6d3b7ccb
commit 5b1c984552
4 changed files with 24 additions and 8 deletions

View File

@@ -49,7 +49,8 @@ class TestKerncraftAPI(unittest.TestCase):
)
self.assertEqual(kapi.get_port_occupation_cycles(), port_occupation)
self.assertEqual(kapi.get_total_throughput(), 2.0)
self.assertEqual(kapi.get_latency(), (1.0, 8.0))
# TODO: LCD 2 because of OF flag LCD --> still to discuss?
self.assertEqual(kapi.get_latency(), (2.0, 8.0))
def test_kerncraft_API_AArch64(self):
kapi = KerncraftAPI('tx2', self.code_AArch64)

View File

@@ -186,7 +186,7 @@ class TestSemanticTools(unittest.TestCase):
def test_loop_carried_dependency_x86(self):
lcd_id = 9
lcd_id2 = 6
lcd_id2 = 10
dg = KernelDG(self.kernel_x86, self.parser_x86, self.machine_model_csx)
lc_deps = dg.get_loopcarried_dependencies()
self.assertEqual(len(lc_deps), 2)
@@ -198,13 +198,14 @@ class TestSemanticTools(unittest.TestCase):
self.assertEqual(
lc_deps[lcd_id]['dependencies'][0], dg.dg.nodes(data=True)[lcd_id]['instruction_form']
)
# ID 6
# ursprünglich ID 6 mit LCD zu ID 6 (len=1)
# TODO discuss
self.assertEqual(
lc_deps[lcd_id2]['root'], dg.dg.nodes(data=True)[lcd_id2]['instruction_form']
)
self.assertEqual(len(lc_deps[lcd_id2]['dependencies']), 1)
self.assertEqual(len(lc_deps[lcd_id2]['dependencies']), 2)
self.assertEqual(
lc_deps[lcd_id2]['dependencies'][0],
lc_deps[lcd_id2]['dependencies'][1],
dg.dg.nodes(data=True)[lcd_id2]['instruction_form'],
)