def test_no_double_accounting_sob(self): "test that suspension-oblivious analysis is correctly accounted for" lb.apply_clustered_omlp_bounds(self.ts, 1) self.assertTrue(rta.is_schedulable(1, self.p0)) self.assertTrue(rta.is_schedulable(1, self.p1)) # Expected inflated WCET and response times: # - for highest-priority task: # - arrival sob pi-blocking of up to 2ms # - sob pi-blocking of up to 1ms self.assertEqual(self.p0[0].cost, 10 + 2 + 1) self.assertEqual(self.p1[0].cost, 10 + 2 + 1) self.assertEqual(self.p0[0].response_time, 10 + 2 + 1) self.assertEqual(self.p1[0].response_time, 10 + 2 + 1) # - for lower-priority task: # - no arrival blocking # - interference of up to 10ms + 3ms (sob inflation) # - spin blocking of up to 1ms self.assertEqual(self.p0[1].cost, 10 + 1) self.assertEqual(self.p1[1].cost, 10 + 1) self.assertEqual(self.p0[1].response_time, 10 + 13 + 1) self.assertEqual(self.p1[1].response_time, 10 + 13 + 1)
def test_clustered_kx_omlp_no_replication(self): ts = self.ts.copy() lb.apply_clustered_kx_omlp_bounds(self.ts, 2) lb.apply_clustered_omlp_bounds(ts, 2) self.assertEqual(self.ts[0].cost, ts[0].cost) self.assertEqual(self.ts[1].cost, ts[1].cost) self.assertEqual(self.ts[2].cost, ts[2].cost) self.assertEqual(self.ts[3].cost, ts[3].cost)
def test_clustered_omlp(self): lb.apply_clustered_omlp_bounds(self.ts, 2) self.sob_non_zero_blocking()