def test_probe_quota(self): self.b1.attach_kprobe(event="schedule", fn_name="count") self.b2.attach_kprobe(event="submit_bio", fn_name="count") self.assertEqual(1, self.b1.num_open_kprobes()) self.assertEqual(1, self.b2.num_open_kprobes()) self.assertEqual(2, _get_num_open_probes()) self.b1.cleanup() self.b2.cleanup() self.assertEqual(0, _get_num_open_probes())