History log of /linux-master/tools/testing/selftests/timers/clocksource-switch.c
Revision Date Author Comments
# ce7d1017 13-Jul-2022 Wolfram Sang <wsa+renesas@sang-engineering.com>

selftests: timers: clocksource-switch: adapt to kselftest framework

So we have proper counters at the end of a test. We also print the
kselftest header at the end of the test, so we don't mix with the output
of the child process. There is only this one test anyhow.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: John Stultz <jstultz@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 248ae6f4 14-Jul-2022 Wolfram Sang <wsa+renesas@sang-engineering.com>

selftests: timers: clocksource-switch: add 'runtime' command line parameter

So the user can decide how long the test should run.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: John Stultz <jstultz@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 19b6823a 13-Jul-2022 Wolfram Sang <wsa+renesas@sang-engineering.com>

selftests: timers: clocksource-switch: add command line switch to skip sanity check

The sanity check takes a while. If you do repeated checks when
debugging, this is time consuming. Add a parameter to skip it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: John Stultz <jstultz@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 5be1fd96 13-Jul-2022 Wolfram Sang <wsa+renesas@sang-engineering.com>

selftests: timers: clocksource-switch: sort includes

It is easier to check if you need to add an include if the existing ones
are sorted.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: John Stultz <jstultz@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 4d8f52ac 13-Jul-2022 Wolfram Sang <wsa+renesas@sang-engineering.com>

selftests: timers: clocksource-switch: fix passing errors from child

The return value from system() is a waitpid-style integer. Do not return
it directly because with the implicit masking in exit() it will always
return 0. Access it with appropriate macros to really pass on errors.

Fixes: 7290ce1423c3 ("selftests/timers: Add clocksource-switch test from timetest suite")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: John Stultz <jstultz@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# ea2c679e 14-Mar-2021 Colin Ian King <colin.king@canonical.com>

selftests/timers: Fix spelling mistake "clocksourc" -> "clocksource"

There is a spelling mistake in a comment. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 4bf07f65 22-Mar-2021 Ingo Molnar <mingo@kernel.org>

timekeeping, clocksource: Fix various typos in comments

Fix ~56 single-word typos in timekeeping & clocksource code comments.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-kernel@vger.kernel.org


# 8f14e26b 23-Aug-2017 Benjamin Gaignard <benjamin.gaignard@linaro.org>

selftests/timers: make loop consistent with array size

clocksource_list array is defined as char [10][30] so
to initialise it we only have to iterate 10 times.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>


# b8410650 11-Aug-2017 Shuah Khan <shuah@kernel.org>

selftests: timers: drop support for !KTEST case

There is no need to keep timers tests in sync with external timers
repo. Drop support for !KTEST to support for building and running
timers tests without kselftest framework.

Reference: https://lkml.org/lkml/2017/8/10/952
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Acked-by: John Stultz <john.stultz@linaro.org>


# 05844f83 12-Apr-2017 Colin Ian King <colin.king@canonical.com>

selftests/timers: fix spelling mistake: "Asynchronous"

trivial fix to spelling mistake in printed message.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>


# 3b44edaa 21-Sep-2015 Andrzej Hajda <a.hajda@samsung.com>

selftests/timers: fix write return value handlng

The function can return negative value.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>


# 7290ce14 11-Mar-2015 John Stultz <john.stultz@linaro.org>

selftests/timers: Add clocksource-switch test from timetest suite

Adds the clocksource-switch tests which continually switches the
current clocksource between all the available ones, watching for
any timekeeping inconsistencies.

Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Tested-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>