thermal: add new test group
PATCH 1/1 thermal: add new test group
This is a new test for checking thermal interrupt events.
--- runtest/thermal | 3 + scenario_groups/default | 1 + testcases/kernel/Makefile | 1 + testcases/kernel/thermal/Makefile | 9 + .../kernel/thermal/thermal_interrupt_events.c | 188 ++++++++++++++++++ 5 files changed, 202 insertions(+) create mode 100644 runtest/thermal create mode 100644 testcases/kernel/thermal/Makefile create mode 100644 testcases/kernel/thermal/thermal_interrupt_events.c
runtest/thermal new file +3 -0
@@ -0,0 +1,3 @@ +# Thermal driver API +# https://docs.kernel.org/driver-api/thermal/ +thermal_interrupt_events thermal_interrupt_events.sh
scenario_groups/default +1 -0
@@ -26,3 +26,4 @@ crypto kernel_misc uevent watchqueue +thermal
testcases/kernel/Makefile +1 -0
@@ -36,6 +36,7 @@ SUBDIRS += connectors \ sched \ security \ sound \ + thermal \ tracing \ uevents \ watchqueue \
testcases/kernel/thermal/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2025, Intel Corporation. All rights reserved. +# Author:Piotr Kubaj <[email protected]> + +top_srcdir ?= ../../.. + +include $(top_srcdir)/include/mk/testcases.mk + +include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/thermal/thermal_interrupt_events.c new file +188 -0
188 lines not on this page · raw message
Signature · 13 lines
2.47.3 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych. Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited. -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
There are a few issues with this code. We need to clean it up before proceeding with the proper review. In LTP we have a strict policy when it comes to writing new tests and that can be read in the following links:
https://linux-test-project.readthedocs.io/en/latest/developers/ground_rules.html
https://linux-test-project.readthedocs.io/en/latest/developers/writing_tests.html
https://linux-test-project.readthedocs.io/en/latest/developers/test_case_tutorial.html
Documentation is away from being perfect, but it needs to be read before proceeding, since some technical aspects are covered only in there and inside some of our reviews, especially the ones from maintainers with the highest expertise (@Cyril, @Petr and @Li in particular).
A few points below:
* run make check locally inside the test folder and verify errors inside the test code
* run github CI by pushing your commits inside a forked LTP project. The patch is not passing in any of our tested platforms (I'm sorry if CI report is not working in patchwork yet, but that has been fixed today)
* please verify that all you need has not been implemented inside the LTP library already. For instance, we already have tst_ncpus() and _SC_NPROCESSORS_ONLN is not needed
* please avoid as much as possible unsafe memory operations over strings. we dont really want to use strcpy(), strcat(), etc. In most of the cases, snprint() and asprintf() are the right choice
* why using regexp for something as easy as finding a substring inside a string, without any particular substring rule over data?
In general, we need to create a code that is working as good as possible, since debugging test failures can be really complex inside kernel. Test has to provide very little friction with the kernel in order to reduce test maintenance.
Let's start from this, we will continue the review when these points are first achieved.
Kind regards,
Signature · 7 lines
Andrea Cervesato SUSE QE Automation Engineer Linux [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp