[{"id":3683082,"web_url":"http://patchwork.ozlabs.org/comment/3683082/","msgid":"<20260428025800.4024-1-linuxtestproject.agent@gmail.com>","list_archive_url":null,"date":"2026-04-28T02:58:00","subject":"Re: [LTP] testcases/nvme: Add NVMe device discovery and\n identification test","submitter":{"id":93132,"url":"http://patchwork.ozlabs.org/api/people/93132/","name":null,"email":"linuxtestproject.agent@gmail.com"},"content":"Hi priyama2,\n\nOn Wed, 29 Apr 2026, priyama2 wrote:\n> testcases/nvme: Add NVMe device discovery and identification test\n\n> This patch introduces the first test case (nvme01) for NVMe device\n> testing in LTP. The test verifies: [...]\n\nThe commit body describes what the test does and what hardware it was\nrun on, but doesn't explain *why* this test is being added to LTP —\nwhat gap does it fill, or what problem prompted writing it?\n\n> +TARGETS\t\t= nvme01 nvme02 nvme03 nvme04\n\nnvme02.c, nvme03.c, nvme04.c are not present in this patch, so `make`\nwill fail. Remove the missing targets (and their explicit rules) from\nthis patch; add them when those tests land.\n\n> +// SPDX-License-Identifier: GPL-2.0-or-later\n> +/*\n> + * Copyright (c) 2024 IBM Corporation\n> + * Author: LTP NVMe Test Suite\n\nCopyright year must be 2026 for a newly added file. \"Author: LTP NVMe\nTest Suite\" is not a real author; use your name and email. Also, the\ntest description must be in a separate /*\\ RST block (not merged into\nthe copyright block).\n\n> +\tdir = opendir(NVME_DEV_PATH);\n> +\tif (!dir) {\n> +\t\ttst_brk(TBROK | TERRNO, \"Failed to open %s\", NVME_DEV_PATH);\n\nUse SAFE_OPENDIR() here (and SAFE_FOPEN() / SAFE_CLOSEDIR() /\nSAFE_FCLOSE() elsewhere). These are defined in tst_safe_macros.h and\ntst_safe_stdio.h.\n\n> +static int nvme_device_found = 0;\n> +static char nvme_dev_name[256];\n\nBoth static vars are set in case 0 of run() but never reset. Under\n`-i` (iteration), subsequent iterations inherit stale state. Reset\nthem at the top of run().\n\n> +\t.needs_root = 1,\n\nAll operations in this test are unprivileged sysfs/devfs reads. Drop\n.needs_root.\n\n> +CC\t\t= gcc\n> +CFLAGS\t\t= -Wall -O2 -I/opt/ltp/include\n> +LDFLAGS\t\t= -L/opt/ltp/lib\n\nThis is a hand-rolled standalone Makefile with hardcoded paths. Replace\nit with LTP's build system (env_pre.mk + generic_leaf_target.mk). Also\nadd `nvme` to SUBDIRS in testcases/kernel/device-drivers/Makefile, and\nadd a runtest entry and .gitignore entry for nvme01.\n\n[...]\n\nPre-existing issues noticed in the surrounding code (not introduced by\nthis patch):\n\n- nvme01.c:236 — Stray `// Made with Bob` comment at end of file.\n- nvme01.c:58  — `strlen(entry->d_name) == 5` silently skips nvme10+.\n\n---\nNote:\n\nOur agent completed the review of the patch. The full review can be\nfound at: https://github.com/linux-test-project/ltp-agent/actions/runs/25031212578\n\nThe agent can sometimes produce false positives although often its\nfindings are genuine. If you find issues with the review, please\ncomment this email or ignore the suggestions.\n\nRegards,\nLTP AI Reviewer","headers":{"Return-Path":"<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>","X-Original-To":["incoming@patchwork.ozlabs.org","ltp@lists.linux.it"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","ltp@picard.linux.it"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=RjWROxy4;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=2001:1418:10:5::2; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)"],"Received":["from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g4Q9H6FZcz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 12:58:11 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 4561F3E28AC\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 04:58:08 +0200 (CEST)","from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id DA94A3C7A5F\n for <ltp@lists.linux.it>; Tue, 28 Apr 2026 04:58:04 +0200 (CEST)","from mail-dy1-x1341.google.com (mail-dy1-x1341.google.com\n [IPv6:2607:f8b0:4864:20::1341])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 37C761400539\n for <ltp@lists.linux.it>; Tue, 28 Apr 2026 04:58:04 +0200 (CEST)","by mail-dy1-x1341.google.com with SMTP id\n 5a478bee46e88-2d96243c91fso17796283eec.1\n for <ltp@lists.linux.it>; Mon, 27 Apr 2026 19:58:04 -0700 (PDT)","from\n runnervmeorf1.isbtygbhkgwune5ckp3zdudqla.dx.internal.cloudapp.net\n ([52.159.247.168]) by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2ed09fb6b7fsm1214150eec.10.2026.04.27.19.58.01\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 27 Apr 2026 19:58:01 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777345082; x=1777949882; darn=lists.linux.it;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=UwJ+jczFmIFoXKDNKc/3buatJWOHSpM7A1xxXG/YUfI=;\n b=RjWROxy4y55ps+f/+VnF+lYmLCx7mkQK4Vd0vLKvRJBqqwHULMldA1Sxw26Lj0Px63\n 8dUCUiD4SL7TxbOvlemS7/G5iK0kY9he+YChWz8xwYqSba8bvN+Ccjt7A7APo69d6z9S\n 2qR9imQt2OJSgpKJ1nxEYMgMTlumpBq7swfqlVhU8PCmMhBmos/eq3kb3jen3oGwn85n\n YaKjSz+cyolTfG7g8ji0YvJjrYRaUEMWqx60qyvO1O95VCPMN5lrLkmswHNYdJFgjYha\n 6xUlNiTAQ61WoV0oeSotVqbWbLHvuxk0vWBCnVy89Vpx1+WM0Gk8nBYAjf1hw2PTCGF5\n zL3A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777345082; x=1777949882;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=UwJ+jczFmIFoXKDNKc/3buatJWOHSpM7A1xxXG/YUfI=;\n b=R3qfsWSKkmy4mXL9JtCoWOLkNLLpVauOvRQDC8b6n2FWe1Lih2MKJ501mc/91oePzG\n YamAANpvs0LzdeUsci9Mam4OzkepCVFJn5YVAI6f9W66slwkU2px+B99JjZNJGleb9rh\n 6KKwhvP8HaFeZSl88Ka9bhDpHfHZgywiDSkaUOcl/qw7ttzpMwy12NzTVIJYyb4dJU5s\n 6cfq8OMUQjKJY+/rJGd1Rb/hGqJ6vYz45Z96T85y+auGv5ee/BJ1tfK06AVuNiUgkqo+\n EY2FitKAoO3OUvrfdK2aT3xj0U4qDvAIw+UWk3IunpHU9VAormd+nN9uHLsagSW1Sh3v\n lDMw==","X-Gm-Message-State":"AOJu0YwtcmCIAfYDt9Em79mp0KNUcoc1HJEpZmWtDZ7fVjlsYgj6FUi+\n SuoI3V/mNqBBaIwGoyESo7ROdAQtijeuJ6z1b5s6tyEtfIjbY1PmTX7t","X-Gm-Gg":"AeBDiet2z8lDZsdzVOTzNj0QPF5xQFfIPD9N/StN+aNC066C3GsIHy58ZMs1oaBIYrC\n C9vhsRJhLRSJgSfRhwsfUZ8pduQTrbB3nZ9PnkzaykJbcDa2Rshu7afh+mkrPPjwW9hqW91ukvP\n LcdqadNokVz+GmD5yHjW9jncMjGbrwHpYFnI16DiKRGpJJqtIi5vLe6MwTgPGHJc+MFTw9R0xZW\n FyU9foJv8tLUWiPT0NffSNDLkUwzKKz8pxVB8qo7s6wnjnB+vCjmrNrX+L5QsELZmMZyZEEOqFp\n JcSK8F0kEtUdoV5YoRe1BMWjCtUsgX+PMtNw2ZdDAPLsQI99vAum6pw0syjfUAoxBfjQs2vOmrH\n achwoWVl0rVnXaeiwnTvNp7HLksw9hSYe3FdWIvJzYdwy/Sd9omvwtHcPaSzAKr3HOHz1HVGqXr\n ggZy3lnHUoXoW8NFSjJirzZ8d8tI5ze4j6VMjU6ii/FcHt+HfwsfhPynGMheA12NRTH6/FjpMI+\n s49hOnU7E79sQdG38tir6SKA82ondicN9kXXl9INRdYdwc8kZRd6XHuPpvJHA==","X-Received":"by 2002:a05:7300:e686:b0:2d8:7302:d21 with SMTP id\n 5a478bee46e88-2ed0a121a0fmr723574eec.16.1777345082228;\n Mon, 27 Apr 2026 19:58:02 -0700 (PDT)","From":"linuxtestproject.agent@gmail.com","To":"priyama2 <priyama2@linux.ibm.com>","Date":"Tue, 28 Apr 2026 02:58:00 +0000","Message-ID":"<20260428025800.4024-1-linuxtestproject.agent@gmail.com>","X-Mailer":"git-send-email 2.54.0","In-Reply-To":"<20260429105114.710966-1-priyama2@linux.ibm.com>","References":"<20260429105114.710966-1-priyama2@linux.ibm.com>","MIME-Version":"1.0","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS\n shortcircuit=no autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-6.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-6.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"Re: [LTP] testcases/nvme: Add NVMe device discovery and\n identification test","X-BeenThere":"ltp@lists.linux.it","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"Linux Test Project <ltp.lists.linux.it>","List-Unsubscribe":"<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>","List-Archive":"<http://lists.linux.it/pipermail/ltp/>","List-Post":"<mailto:ltp@lists.linux.it>","List-Help":"<mailto:ltp-request@lists.linux.it?subject=help>","List-Subscribe":"<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>","Cc":"ltp@lists.linux.it","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"}},{"id":3683210,"web_url":"http://patchwork.ozlabs.org/comment/3683210/","msgid":"<afBnbxFLCb4vM39Z@yuki.lan>","list_archive_url":null,"date":"2026-04-28T07:53:19","subject":"Re: [LTP] [PATCH] testcases/nvme: Add NVMe device discovery and\n identification test","submitter":{"id":8530,"url":"http://patchwork.ozlabs.org/api/people/8530/","name":"Cyril Hrubis","email":"chrubis@suse.cz"},"content":"Hi!\n> Signed-off-by: priyama2 <priyama2@linux.ibm.com>\n> ---\n>  testcases/kernel/device-drivers/nvme/Makefile |  42 ++++\n>  testcases/kernel/device-drivers/nvme/README   | 155 ++++++++++++\n>  testcases/kernel/device-drivers/nvme/nvme01.c | 236 ++++++++++++++++++\n>  3 files changed, 433 insertions(+)\n>  create mode 100644 testcases/kernel/device-drivers/nvme/Makefile\n>  create mode 100644 testcases/kernel/device-drivers/nvme/README\n>  create mode 100644 testcases/kernel/device-drivers/nvme/nvme01.c\n> \n> diff --git a/testcases/kernel/device-drivers/nvme/Makefile b/testcases/kernel/device-drivers/nvme/Makefile\n> new file mode 100644\n> index 000000000..ace6696f6\n> --- /dev/null\n> +++ b/testcases/kernel/device-drivers/nvme/Makefile\n> @@ -0,0 +1,42 @@\n> +# SPDX-License-Identifier: GPL-2.0-or-later\n> +# Copyright (c) 2024 IBM Corporation\n> +#\n> +# Standalone Makefile for NVMe LTP test suite\n> +\n> +# Compiler and flags\n> +CC\t\t= gcc\n> +CFLAGS\t\t= -Wall -O2 -I/opt/ltp/include\n> +LDFLAGS\t\t= -L/opt/ltp/lib\n> +LDLIBS\t\t= -lltp -lrt\n> +\n> +# Test binaries\n> +TARGETS\t\t= nvme01 nvme02 nvme03 nvme04\n> +\n> +# Build all tests\n> +all: $(TARGETS)\n> +\n> +nvme01: nvme01.c\n> +\t$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)\n> +\n> +nvme02: nvme02.c\n> +\t$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)\n> +\n> +nvme03: nvme03.c\n> +\t$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)\n> +\n> +nvme04: nvme04.c\n> +\t$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)\n> +\n> +# Install targets\n> +install: $(TARGETS)\n> +\t@mkdir -p /opt/ltp/testcases/bin\n> +\t@for target in $(TARGETS); do \\\n> +\t\tinstall -m 0755 $$target /opt/ltp/testcases/bin/; \\\n> +\tdone\n> +\t@echo \"Tests installed to /opt/ltp/testcases/bin/\"\n> +\n> +# Clean\n> +clean:\n> +\trm -f $(TARGETS) *.o\n> +\n> +.PHONY: all install clean\n\nWe have a buildsystem in LTP, all you need to do is to include the right\nfile in the Makefile, do that instead.\n\n> diff --git a/testcases/kernel/device-drivers/nvme/README b/testcases/kernel/device-drivers/nvme/README\n> new file mode 100644\n> index 000000000..6ee5796fe\n> --- /dev/null\n> +++ b/testcases/kernel/device-drivers/nvme/README\n> @@ -0,0 +1,155 @@\n> +NVMe Test Suite for Linux Test Project (LTP)\n> +==============================================\n> +\n> +This directory contains test cases for NVMe (Non-Volatile Memory Express) \n> +device functionality testing.\n> +\n> +Test Cases\n> +----------\n> +\n> +1. nvme01 - Device Discovery & Identification\n> +   Tests:\n> +   - Detect NVMe controllers\n> +   - Enumerate namespaces\n> +   - Verify PCI enumeration\n> +   - Check driver binding\n> +\n> +2. nvme02 - Namespace Management\n> +   Tests:\n> +   - Create namespaces (various sizes)\n> +   - Delete namespaces\n> +   - Attach/detach namespaces to controllers\n> +   - Resize namespaces\n> +   - Format namespaces (different block sizes: 512B, 4KB)\n> +   - Namespace sharing across controllers\n> +\n> +3. nvme03 - I/O Operations\n> +   Tests:\n> +   - Sequential read/write operations\n> +   - Random read/write operations\n> +   - Mixed workloads\n> +   - Different block sizes (512B, 4KB, 8KB)\n> +   - Queue depth variations\n> +   - Direct I/O vs buffered I/O\n> +\n> +4. nvme04 - Multipath & Redundancy\n> +   Tests:\n> +   - Path failover testing\n> +   - Load balancing across paths\n> +   - Path recovery\n> +   - ANA (Asymmetric Namespace Access) states\n> +   - Controller failover\n> +\n> +Requirements\n> +------------\n> +\n> +Hardware:\n> +- System with NVMe storage device(s)\n> +- For multipath tests: NVMe device with multiple paths configured\n> +\n> +Software:\n> +- Linux kernel with NVMe support (CONFIG_BLK_DEV_NVME=y)\n> +- nvme-cli tools (for namespace management tests)\n> +- Root/sudo privileges\n> +\n> +Building\n> +--------\n> +\n> +From the LTP root directory:\n> +  make -C testcases/kernel/device-drivers/nvme\n> +\n> +Or from this directory:\n> +  make\n> +\n> +Running Tests\n> +-------------\n> +\n> +Individual test execution:\n> +  ./nvme01\n> +  ./nvme02\n> +  ./nvme03\n> +  ./nvme04\n> +\n> +Using LTP runtest:\n> +  runltp -f nvme\n> +\n> +Using runtest file:\n> +  runltp -f /opt/ltp/runtest/nvme\n> +\n> +Test Results\n> +------------\n> +\n> +Tests use standard LTP result codes:\n> +- TPASS: Test passed\n> +- TFAIL: Test failed\n> +- TCONF: Test not configured (e.g., no NVMe device found)\n> +- TBROK: Test broken (setup failure)\n> +- TWARN: Test warning\n> +\n> +Notes\n> +-----\n> +\n> +1. Some tests require specific hardware configurations:\n> +   - nvme02: May require namespace management support\n> +   - nvme04: Requires multipath configuration for full testing\n> +\n> +2. Destructive tests:\n> +   - nvme02 includes namespace creation/deletion which may affect data\n> +   - Always run on test systems or with proper backups\n> +\n> +3. Performance tests (nvme03):\n> +   - Results vary based on hardware and system load\n> +   - Tests measure relative performance, not absolute benchmarks\n> +\n> +4. Root privileges:\n> +   - All tests require root access for device operations\n> +\n> +Test Coverage\n> +-------------\n> +\n> +The test suite covers:\n> +- Basic NVMe device detection and enumeration\n> +- Namespace lifecycle management\n> +- I/O performance characteristics\n> +- Multipath and redundancy features\n> +- Driver and controller state verification\n> +\n> +Known Limitations\n> +-----------------\n> +\n> +1. Namespace management tests may not work on all NVMe devices\n> +   (depends on controller capabilities)\n> +\n> +2. Multipath tests require specific hardware and kernel configuration\n> +\n> +3. Some tests are informational and may show TCONF on systems\n> +   without full NVMe feature support\n> +\n> +Contributing\n> +------------\n> +\n> +When adding new tests:\n> +1. Follow LTP coding standards\n> +2. Use tst_test.h framework\n> +3. Include proper error handling\n> +4. Document test purpose and requirements\n> +5. Test on multiple NVMe device types if possible\n> +\n> +References\n> +----------\n> +\n> +- NVMe Specification: https://nvmexpress.org/specifications/\n> +- Linux NVMe Driver: Documentation/block/nvme.rst\n> +- nvme-cli: https://github.com/linux-nvme/nvme-cli\n> +- LTP Documentation: https://linux-test-project.github.io/\n> +\n> +Authors\n> +-------\n> +\n> +Copyright (c) 2024 IBM Corporation\n> +LTP NVMe Test Suite\n> +\n> +License\n> +-------\n> +\n\nNo README should be added. Instead the test description should be added\ninto a special doc comment at the top of the test. That description is\nthen extracted into online documentation:\n\nhttps://linux-test-project.readthedocs.io/en/latest/users/test_catalog.html\n\nAlso this is too verbose, there is a lot of useless information. Just\nkeep the part that describes what the test actually does. No need to\ndescribe how to compile the tests or how to write new tests, we have\nplenty of online docs for LTP now.\n\n> diff --git a/testcases/kernel/device-drivers/nvme/nvme01.c b/testcases/kernel/device-drivers/nvme/nvme01.c\n> new file mode 100644\n> index 000000000..82fbd315b\n> --- /dev/null\n> +++ b/testcases/kernel/device-drivers/nvme/nvme01.c\n> @@ -0,0 +1,236 @@\n> +// SPDX-License-Identifier: GPL-2.0-or-later\n> +/*\n> + * Copyright (c) 2024 IBM Corporation\n> + * Author: LTP NVMe Test Suite\n                    ^\n\t\t    This does not make any sense.\n\n\nAnd the part below should be the special doc comment that is exported\ninto docs.\n\n> + * Test: NVMe Device Discovery & Identification\n> + *\n> + * This test verifies:\n> + * - Detection of NVMe controllers\n> + * - Enumeration of namespaces\n> + * - PCI enumeration verification\n> + * - Driver binding check\n> + */\n> +\n> +#define _GNU_SOURCE\n> +#include <stdio.h>\n> +#include <stdlib.h>\n> +#include <string.h>\n> +#include <unistd.h>\n> +#include <fcntl.h>\n> +#include <sys/types.h>\n> +#include <sys/stat.h>\n> +#include <dirent.h>\n> +#include <errno.h>\n> +\n> +#include \"tst_test.h\"\n> +\n> +#define NVME_DEV_PATH \"/dev\"\n> +#define NVME_SYS_PATH \"/sys/class/nvme\"\n> +#define PCI_DEVICES_PATH \"/sys/bus/pci/devices\"\n> +\n> +static int nvme_device_found = 0;\n> +static char nvme_dev_name[256];\n> +\n> +/*\n> + * Test Case 1: Detect NVMe Controllers\n> + * Verifies that NVMe controllers are present in the system\n> + */\n\nNo obvious comments like this one please. It's pretty clear from the\nfunction name what it does.\n\n> +static void test_detect_nvme_controllers(void)\n> +{\n> +\tDIR *dir;\n> +\tstruct dirent *entry;\n> +\tint found = 0;\n> +\n> +\tdir = opendir(NVME_DEV_PATH);\n> +\tif (!dir) {\n> +\t\ttst_brk(TBROK | TERRNO, \"Failed to open %s\", NVME_DEV_PATH);\n> +\t\treturn;\n> +\t}\n\nUse SAFE_MACROS() whenever possible. In this case SAFE_OPENDIR().\n\n> +\ttst_res(TINFO, \"Scanning for NVMe devices in %s\", NVME_DEV_PATH);\n> +\n> +\twhile ((entry = readdir(dir)) != NULL) {\n> +\t\tif (strncmp(entry->d_name, \"nvme\", 4) == 0 &&\n> +\t\t    strlen(entry->d_name) == 5) {  /* nvme0, nvme1, etc. */\n                                                  ^\n                   No comments commenting obvious like this.\n\n> +\t\t\ttst_res(TINFO, \"Found NVMe controller: %s\", entry->d_name);\n> +\t\t\tstrncpy(nvme_dev_name, entry->d_name, sizeof(nvme_dev_name) - 1);\n> +\t\t\tfound = 1;\n> +\t\t\tnvme_device_found = 1;\n> +\t\t}\n> +\t}\n> +\n> +\tclosedir(dir);\n\nSAFE_CLOSEDIR()\n\n\nAnd similar comments apply for the rest of the code.","headers":{"Return-Path":"<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>","X-Original-To":["incoming@patchwork.ozlabs.org","ltp@lists.linux.it"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","ltp@picard.linux.it"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256\n header.s=susede2_rsa header.b=kmSHcwxx;\n\tdkim=fail reason=\"signature verification failed\" header.d=suse.cz\n header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519\n header.b=J7Uh+uvC;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa\n header.b=O+KD2XcX;\n\tdkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=fBQ8AJiZ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=2001:1418:10:5::2; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)","smtp-out1.suse.de;\n dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=O+KD2XcX;\n dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=fBQ8AJiZ"],"Received":["from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g4Xjq62j4z1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 17:53:19 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id D78093E2532\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 09:53:17 +0200 (CEST)","from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id 7053D3CFBA2\n for <ltp@lists.linux.it>; Tue, 28 Apr 2026 09:53:14 +0200 (CEST)","from smtp-out1.suse.de (smtp-out1.suse.de\n [IPv6:2a07:de40:b251:101:10:150:64:1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 947D31400BCA\n for <ltp@lists.linux.it>; Tue, 28 Apr 2026 09:53:13 +0200 (CEST)","from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104:10:150:64:97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id A21126A81D;\n Tue, 28 Apr 2026 07:53:05 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 923B5593B0;\n Tue, 28 Apr 2026 07:53:05 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id scVlImFn8Gm/EgAAD6G6ig\n (envelope-from <chrubis@suse.cz>); Tue, 28 Apr 2026 07:53:05 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_rsa;\n t=1777362786;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=ob4VR6DPI5M4l2hQuO+vb91HT83n+uOoI8gpx+GpBBM=;\n b=kmSHcwxxQWmT5Q/jHUw9hqlZ2nCRnYU0rdy7q60QqNnYoxlSrF8jKlNeGdt6z1Rsq1sEgj\n yAe/EieQZUIMFNWmmcT62jU7OsfPPzig+0T9RVTX7eELkYJaYajazgqlfSH3mTOc5rBOF0\n 0maj0DISIYMDNefddn3SNjkbFzon42U=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_ed25519; t=1777362786;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=ob4VR6DPI5M4l2hQuO+vb91HT83n+uOoI8gpx+GpBBM=;\n b=J7Uh+uvCeMJa1i/epKkkXlEj13ZtGc5hAZvRuOyQEnx5+QGdd+rWOlUS/KmFp+kRLUGR0t\n EZmFbnrR6DupKqAg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_rsa;\n t=1777362785;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=ob4VR6DPI5M4l2hQuO+vb91HT83n+uOoI8gpx+GpBBM=;\n b=O+KD2XcXao9cd1VRoVNfX9GSJdPD/4a4eoroaNgmp7sLEWeW04WYy1sozc5qqAU6BDd+4X\n Yj4qBOzBgzzpAb0JvbqZVI/+lCOwtzBQN3/jGzGL2Pz1M/dQvPBHNvtoRlQSNQldufP498\n 3/X9Gs0PURVr5M02XJtcVAqG6lYG8CM=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;\n s=susede2_ed25519; t=1777362785;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=ob4VR6DPI5M4l2hQuO+vb91HT83n+uOoI8gpx+GpBBM=;\n b=fBQ8AJiZKxM3qi2wGw9QRuJP7T7ZoWY6PckAzeIK2rPILD8Mqqe1fK5ZHo5aTz1mG0hP6N\n LLuHRysMJqSwRjAA=="],"Date":"Tue, 28 Apr 2026 09:53:19 +0200","From":"Cyril Hrubis <chrubis@suse.cz>","To":"priyama2 <priyama2@linux.ibm.com>","Message-ID":"<afBnbxFLCb4vM39Z@yuki.lan>","References":"<20260429105114.710966-1-priyama2@linux.ibm.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20260429105114.710966-1-priyama2@linux.ibm.com>","X-Spamd-Result":"default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n NEURAL_HAM_LONG(-1.00)[-1.000];\n R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];\n NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain];\n MX_GOOD(-0.01)[]; FUZZY_RATELIMITED(0.00)[rspamd.com];\n RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+];\n TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[];\n RCVD_TLS_ALL(0.00)[];\n SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[];\n RCPT_COUNT_TWO(0.00)[2]; RCVD_COUNT_TWO(0.00)[2];\n TO_MATCH_ENVRCPT_ALL(0.00)[];\n DBL_BLOCKED_OPENRESOLVER(0.00)[nvmexpress.org:url,linux-test-project.readthedocs.io:url,linux-test-project.github.io:url,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.cz:dkim,suse.cz:email,yuki.lan:mid];\n DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];\n DKIM_TRACE(0.00)[suse.cz:+]","X-Rspamd-Action":"no action","X-Spam-Score":"-4.51","X-Spam-Level":"","X-Rspamd-Server":"rspamd1.dmz-prg2.suse.org","X-Rspamd-Queue-Id":"A21126A81D","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no\n autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-6.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-6.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"Re: [LTP] [PATCH] testcases/nvme: Add NVMe device discovery and\n identification test","X-BeenThere":"ltp@lists.linux.it","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"Linux Test Project <ltp.lists.linux.it>","List-Unsubscribe":"<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>","List-Archive":"<http://lists.linux.it/pipermail/ltp/>","List-Post":"<mailto:ltp@lists.linux.it>","List-Help":"<mailto:ltp-request@lists.linux.it?subject=help>","List-Subscribe":"<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>","Cc":"ltp@lists.linux.it","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"}}]