Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: priyama2 <priyama2@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] testcases/nvme: Add NVMe device discovery and identification test
Date: Wed, 29 Apr 2026 07:33:26 +0000	[thread overview]
Message-ID: <20260429073327.3985-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260430155241.897024-1-priyama2@linux.ibm.com>

Hi Priya,

On 2026-04-30, priyama2 <priyama2@linux.ibm.com> wrote:
> [PATCH] testcases/nvme: Add NVMe device discovery and identification test

The subject prefix should match the actual directory path:
testcases/kernel/device-drivers/nvme:

The commit body only describes what the test does (restating the subject).
Please add a sentence explaining why the test is needed, e.g. what gap in
NVMe coverage this fills.

> +/*
> + * Copyright (c) 2024 IBM Corporation

New files added in 2026 must use 2026 as the copyright year.

[...]

> +SUBDIRS		:= acpi \
> +		   ...

testcases/kernel/device-drivers/Makefile has an explicit SUBDIRS list that
does not include nvme. The directory will not be built. Add nvme to the list.

[...]

> +static int nvme_device_found;
> +static char nvme_dev_name[256];

These statics are written in run() case 0 and read in cases 1-3 but are
never reset at the top of run(). With -i, stale values from a previous
iteration carry over. Reset them at the start of run().

[...]

> +	.needs_root = 1,

All operations here (reading /dev, /sys) are world-readable. Remove
.needs_root = 1.

[...]

> +		fp = fopen(class_path, "r");
> +		if (!fp)
> +			continue;
> +		...
> +		fclose(fp);

Use SAFE_FOPEN/SAFE_FCLOSE (include/tst_safe_stdio.h), or document why
the raw call with continue-on-failure is intentional.

[...]

> +	len = readlink(driver_path, driver_link, sizeof(driver_link) - 1);

Use SAFE_READLINK (include/tst_safe_macros.h).

Also missing:
- testcases/kernel/device-drivers/nvme/.gitignore entry for nvme01
- runtest/ entry for nvme01 (e.g. in runtest/drivers)

---
Note:

Our agent completed the review of the patch. The full review can be
found at: (not available)

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

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

  reply	other threads:[~2026-04-29  7:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260428075302.7320ef7e3@imap1.dmz-prg2.suse.org>
2026-04-30 15:52 ` [LTP] [PATCH v2] testcases/nvme: Add NVMe device discovery and identification test priyama2
2026-04-29  7:33   ` linuxtestproject.agent [this message]
2026-05-01 15:14 ` [LTP] [PATCH v3] testcases/kernel/device-drivers/nvme: Add NVMe device discovery test priyama2
2026-04-30  6:35   ` [LTP] " linuxtestproject.agent
2026-05-04 10:40   ` [LTP] [PATCH v3] " Andrea Cervesato via ltp
2026-05-05  3:46   ` Sebastian Chlad
2026-05-05  8:45     ` Daniel Wagner
2026-05-05 13:26       ` Daniel Wagner
2026-04-29 10:51 [LTP] [PATCH] testcases/nvme: Add NVMe device discovery and identification test priyama2
2026-04-28  2:58 ` [LTP] " linuxtestproject.agent
     [not found] <20260430154852.896072-1-priyama2@linux.ibm.com>
2026-04-29  7:33 ` linuxtestproject.agent

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=20260429073327.3985-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=ltp@lists.linux.it \
    --cc=priyama2@linux.ibm.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