Commit e45f41ba authored by yonghong-song's avatar yonghong-song Committed by GitHub

fix flaky test_usdt3.py test (#1947)

The poll iteration count 10 sometimes not big enough.
Now let us increase to 100 iterations, but will bail out
if the expected data have received. Hopefully this
will fix flakiness of this test.
Signed-off-by: default avatarYonghong Song <yhs@fb.com>
parent 6954e257
......@@ -131,8 +131,14 @@ int do_trace(struct pt_regs *ctx) {
self.probe_value_other = 1
b["event"].open_perf_buffer(print_event)
for i in range(10):
b.perf_buffer_poll()
for i in range(100):
if (self.probe_value_1 == 0 or
self.probe_value_2 == 0 or
self.probe_value_3 == 0 or
self.probe_value_other != 0):
b.perf_buffer_poll()
else:
break;
self.assertTrue(self.probe_value_1 != 0)
self.assertTrue(self.probe_value_2 != 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment