public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Piotr Kubaj" <piotr.kubaj@intel.com>, <ltp@lists.linux.it>
Cc: tomasz.ossowski@intel.com, helena.anna.dubel@intel.com,
	rafael.j.wysocki@intel.com, daniel.niestepski@intel.com
Subject: Re: [LTP] [PATCH] thermal: add new test group
Date: Mon, 19 Jan 2026 14:20:26 +0100	[thread overview]
Message-ID: <DFSLHKV3EDAP.3TBQI2S9THZ64@suse.com> (raw)
In-Reply-To: <20260119085129.165080-1-piotr.kubaj@intel.com>

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,

-- 
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-01-19 13:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-19  8:51 [LTP] [PATCH] thermal: add new test group Piotr Kubaj
2026-01-19 13:20 ` Andrea Cervesato via ltp [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-11-06 11:43 Piotr Kubaj
2025-11-06 12:46 ` Cyril Hrubis
2025-11-06 16:50   ` Petr Vorel
2025-11-10 10:33     ` Cyril Hrubis
2025-11-10 10:31 ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DFSLHKV3EDAP.3TBQI2S9THZ64@suse.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=daniel.niestepski@intel.com \
    --cc=helena.anna.dubel@intel.com \
    --cc=piotr.kubaj@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=tomasz.ossowski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox