From 34104a0eb1eb49ec08feeea79216672e8a42181f Mon Sep 17 00:00:00 2001 From: zhangjian Date: Thu, 12 Jun 2025 08:48:36 +0000 Subject: [PATCH] test:fix sysfs bug Signed-off-by: zhangjian (cherry picked from commit 552a99c708ed5009194e6e5fa45a5103ed193266) --- 0001-test-fix-sysfs-bug.patch | 26 ++++++++++++++++++++++++++ libnvme.spec | 7 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 0001-test-fix-sysfs-bug.patch diff --git a/0001-test-fix-sysfs-bug.patch b/0001-test-fix-sysfs-bug.patch new file mode 100644 index 0000000..473a277 --- /dev/null +++ b/0001-test-fix-sysfs-bug.patch @@ -0,0 +1,26 @@ +From cce908d4c36a38980404152cc612694ed211a580 Mon Sep 17 00:00:00 2001 +From: zhangjian +Date: Thu, 12 Jun 2025 16:16:26 +0800 +Subject: [PATCH] test:fix sysfs bug + +Signed-off-by: zhangjian +--- + test/sysfs/sysfs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/sysfs/sysfs.c b/test/sysfs/sysfs.c +index c2df178..0ef1d16 100644 +--- a/test/sysfs/sysfs.c ++++ b/test/sysfs/sysfs.c +@@ -62,7 +62,7 @@ static bool compare_content(const char *filename1, const char *filename2) + c2 = getc(f2); + if (c1 != c2) + goto out; +- } while (c1 != EOF || c2 != EOF); ++ } while (c1 != (char)EOF || c2 != (char)EOF); + + if (c1 == c2) + pass = true; +-- +2.43.0 + diff --git a/libnvme.spec b/libnvme.spec index 6219844..cde6680 100644 --- a/libnvme.spec +++ b/libnvme.spec @@ -1,6 +1,6 @@ Name: libnvme Version: 1.8 -Release: 1 +Release: 2 Summary: Linux-native nvme device management library License: LGPLv2+ URL: http://github.com/linux-nvme/libnvme @@ -22,6 +22,8 @@ BuildRequires: dbus-devel BuildRequires: keyutils-libs-devel BuildRequires: python3-devel +Patch1: 0001-test-fix-sysfs-bug.patch + %description Provides library functions for accessing and managing nvme devices on a Linux system. @@ -82,6 +84,9 @@ This package contains Python binding for libnvme. %{python3_sitearch}/libnvme/* %changelog +* Thu Jun 12 2025 zhangjian -1.8-2 +- fix sysfs test bug + * Sat Feb 17 2024 Weifeng Su - 1.8-1 - Upgrade to version 1.8 -Support added for Flexible Data Placement(TP4146) -- Gitee