genirq/timings: Add selftest for next event computation
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 27 May 2019 20:55:21 +0000 (22:55 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 12 Jun 2019 08:47:05 +0000 (10:47 +0200)
commit699785f5d898965408430e841d10cd1cb2c02a77
tree84d09f29925edff26e78e3c86651357afd3feed5
parentf52da98d900e18a250cb14ca426d4041ea7002db
genirq/timings: Add selftest for next event computation

The circular buffers are now validated with selftests. The next interrupt
index algorithm which is the hardest part to validate needs extra coverage.

Add a selftest which uses the intervals stored in the arrays and insert all
the values except the last one. The next event computation must return the
same value as the last element which was not inserted.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: andriy.shevchenko@linux.intel.com
Link: https://lkml.kernel.org/r/20190527205521.12091-9-daniel.lezcano@linaro.org
kernel/irq/timings.c