Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libstorage-ng for openSUSE:Factory 
checked in at 2025-11-20 14:47:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage-ng.new.2061 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Thu Nov 20 14:47:30 2025 rev:316 rq:1318605 version:4.5.278

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes      
2025-11-11 19:19:33.711012764 +0100
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.2061/libstorage-ng.changes    
2025-11-20 14:47:44.495691873 +0100
@@ -1,0 +2,7 @@
+Wed Nov 19 09:54:22 UTC 2025 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#1041
+- extended testsuite
+- 4.5.278
+
+--------------------------------------------------------------------

Old:
----
  libstorage-ng-4.5.277.tar.xz

New:
----
  libstorage-ng-4.5.278.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.SKI45d/_old  2025-11-20 14:47:45.103717545 +0100
+++ /var/tmp/diff_new_pack.SKI45d/_new  2025-11-20 14:47:45.107717714 +0100
@@ -18,7 +18,7 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.5.277
+Version:        4.5.278
 Release:        0
 Summary:        Library for storage management
 License:        GPL-2.0-only

++++++ libstorage-ng-4.5.277.tar.xz -> libstorage-ng-4.5.278.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.277/VERSION 
new/libstorage-ng-4.5.278/VERSION
--- old/libstorage-ng-4.5.277/VERSION   2025-11-10 13:05:23.000000000 +0100
+++ new/libstorage-ng-4.5.278/VERSION   2025-11-19 10:54:22.000000000 +0100
@@ -1 +1 @@
-4.5.277
+4.5.278
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.277/testsuite/SystemInfo/lvs.cc 
new/libstorage-ng-4.5.278/testsuite/SystemInfo/lvs.cc
--- old/libstorage-ng-4.5.277/testsuite/SystemInfo/lvs.cc       2025-11-10 
13:05:23.000000000 +0100
+++ new/libstorage-ng-4.5.278/testsuite/SystemInfo/lvs.cc       2025-11-19 
10:54:22.000000000 +0100
@@ -36,6 +36,28 @@
 }
 
 
+void
+check(const string& vg_name, const string& lv_name, const vector<string>& 
input, const vector<string>& output)
+{
+    Mockup::set_mode(Mockup::Mode::PLAYBACK);
+    Mockup::set_command({ LVS_BIN, "--reportformat", "json", "--config", "log 
{ command_names = 0 prefix = \"\" }",
+           "--units", "b", "--nosuffix", "--all", "--options 
lv_name,lv_uuid,vg_name,vg_uuid,lv_role,lv_attr,"
+           
"lv_size,origin_size,segtype,stripes,stripe_size,chunk_size,pool_lv,pool_lv_uuid,origin,origin_uuid,"
+           "data_lv,data_lv_uuid,metadata_lv,metadata_lv_uuid", "--", vg_name 
+ "/" + lv_name }, input);
+
+    CmdLvs cmd_lvs(vg_name, lv_name);
+
+    ostringstream parsed;
+    parsed.setf(std::ios::boolalpha);
+    parsed << cmd_lvs;
+
+    string lhs = parsed.str();
+    string rhs = boost::join(output, "\n") + "\n";
+
+    BOOST_CHECK_EQUAL(lhs, rhs);
+}
+
+
 BOOST_AUTO_TEST_CASE(parse1)
 {
     vector<string> input = {
@@ -386,3 +408,25 @@
 
     check(input, output);
 }
+
+
+BOOST_AUTO_TEST_CASE(parse10)
+{
+    vector<string> input = {
+       "  {",
+       "      \"report\": [",
+       "          {",
+       "              \"lv\": [",
+       "                  {\"lv_name\":\"c\", 
\"lv_uuid\":\"gqnD48-ev4p-nCdM-EWEP-RAgW-TaDC-h9Hb13\", \"vg_name\":\"b\", 
\"vg_uuid\":\"GbcwxM-Px5E-Xs7u-dLhx-r7RU-4LG4-uGR6Ew\", \"lv_role\":\"public\", 
\"lv_attr\":\"-wi-a-----\", \"lv_size\":\"107369988096\", \"origin_size\":\"\", 
\"segtype\":\"linear\", \"stripes\":\"1\", \"stripe_size\":\"0\", 
\"chunk_size\":\"0\", \"pool_lv\":\"\", \"pool_lv_uuid\":\"\", \"origin\":\"\", 
\"origin_uuid\":\"\", \"data_lv\":\"\", \"data_lv_uuid\":\"\", 
\"metadata_lv\":\"\", \"metadata_lv_uuid\":\"\"}",
+       "              ]",
+       "          }",
+       "      ]",
+       "  }"
+    };
+
+    vector<string> output = {
+       "lv:{ lv-name:c lv-uuid:gqnD48-ev4p-nCdM-EWEP-RAgW-TaDC-h9Hb13 
vg-name:b vg-uuid:GbcwxM-Px5E-Xs7u-dLhx-r7RU-4LG4-uGR6Ew lv-type:normal 
role:public active:true size:107369988096 segments:<stripes:1> }"
+    };
+
+    check("b", "c", input, output);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.277/testsuite/SystemInfo/pvs.cc 
new/libstorage-ng-4.5.278/testsuite/SystemInfo/pvs.cc
--- old/libstorage-ng-4.5.277/testsuite/SystemInfo/pvs.cc       2025-11-10 
13:05:23.000000000 +0100
+++ new/libstorage-ng-4.5.278/testsuite/SystemInfo/pvs.cc       2025-11-19 
10:54:22.000000000 +0100
@@ -19,8 +19,8 @@
 {
     Mockup::set_mode(Mockup::Mode::PLAYBACK);
     Mockup::set_command({ PVS_BIN, "--reportformat", "json", "--config", "log 
{ command_names = 0 prefix = \"\" }",
-           "--units", "b", "--nosuffix", "--all", "--options", 
"pv_name,pv_uuid,vg_name,vg_uuid,pv_attr,pe_start" }
-       , input);
+           "--units", "b", "--nosuffix", "--all", "--options", 
"pv_name,pv_uuid,vg_name,vg_uuid,pv_attr,pe_start" },
+           input);
 
     CmdPvs cmd_pvs;
 
@@ -35,6 +35,27 @@
 }
 
 
+void
+check(const string& pv_name, const vector<string>& input, const 
vector<string>& output)
+{
+    Mockup::set_mode(Mockup::Mode::PLAYBACK);
+    Mockup::set_command({ PVS_BIN, "--reportformat", "json", "--config", "log 
{ command_names = 0 prefix = \"\" }",
+           "--units", "b", "--nosuffix", "--all", "--options", 
"pv_name,pv_uuid,vg_name,vg_uuid,pv_attr,pe_start",
+           pv_name }, input);
+
+    CmdPvs cmd_pvs(pv_name);
+
+    ostringstream parsed;
+    parsed.setf(std::ios::boolalpha);
+    parsed << cmd_pvs;
+
+    string lhs = parsed.str();
+    string rhs = boost::join(output, "\n") + "\n";
+
+    BOOST_CHECK_EQUAL(lhs, rhs);
+}
+
+
 BOOST_AUTO_TEST_CASE(parse1)
 {
     vector<string> input = {
@@ -57,6 +78,30 @@
 }
 
 
+BOOST_AUTO_TEST_CASE(parse2)
+{
+    // The device reported pv name can be different from the provided pv name.
+
+    vector<string> input = {
+       "  {",
+       "      \"report\": [",
+       "          {",
+       "              \"pv\": [",
+       "                  {\"pv_name\":\"/dev/md127\", 
\"pv_uuid\":\"nA8nKb-VSgN-fRvo-pGqm-pRBl-MX3M-Hf2sjT\", \"vg_name\":\"\", 
\"vg_uuid\":\"\", \"pv_attr\":\"---\", \"pe_start\":\"1048576\"}",
+       "              ]",
+       "          }",
+       "      ]",
+       "  }"
+    };
+
+    vector<string> output = {
+       "pv:{ pv-name:/dev/md127 pv-uuid:nA8nKb-VSgN-fRvo-pGqm-pRBl-MX3M-Hf2sjT 
vg-name: vg-uuid: pe-start:1048576 }"
+    };
+
+    check("/dev/md/a", input, output);
+}
+
+
 BOOST_AUTO_TEST_CASE(parse_missing)
 {
     vector<string> input = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.277/testsuite/SystemInfo/vgs.cc 
new/libstorage-ng-4.5.278/testsuite/SystemInfo/vgs.cc
--- old/libstorage-ng-4.5.277/testsuite/SystemInfo/vgs.cc       2025-11-10 
13:05:23.000000000 +0100
+++ new/libstorage-ng-4.5.278/testsuite/SystemInfo/vgs.cc       2025-11-19 
10:54:22.000000000 +0100
@@ -35,6 +35,27 @@
 }
 
 
+void
+check(const string& vg_name, const vector<string>& input, const 
vector<string>& output)
+{
+    Mockup::set_mode(Mockup::Mode::PLAYBACK);
+    Mockup::set_command({ VGS_BIN, "--reportformat", "json", "--config", "log 
{ command_names = 0 prefix = \"\" }",
+           "--units", "b", "--nosuffix", "--options", 
"vg_name,vg_uuid,vg_attr,vg_extent_size,"
+           "vg_extent_count,vg_free_count", "--", vg_name }, input);
+
+    CmdVgs cmd_vgs(vg_name);
+
+    ostringstream parsed;
+    parsed.setf(std::ios::boolalpha);
+    parsed << cmd_vgs;
+
+    string lhs = parsed.str();
+    string rhs = boost::join(output, "\n") + "\n";
+
+    BOOST_CHECK_EQUAL(lhs, rhs);
+}
+
+
 BOOST_AUTO_TEST_CASE(parse1)
 {
     vector<string> input = {
@@ -55,3 +76,25 @@
 
     check(input, output);
 }
+
+
+BOOST_AUTO_TEST_CASE(parse2)
+{
+    vector<string> input = {
+       "  {",
+       "      \"report\": [",
+       "          {",
+       "              \"vg\": [",
+       "                  {\"vg_name\":\"b\", 
\"vg_uuid\":\"GbcwxM-Px5E-Xs7u-dLhx-r7RU-4LG4-uGR6Ew\", \"vg_attr\":\"wz--n-\", 
\"vg_extent_size\":\"4194304\", \"vg_extent_count\":\"25640\", 
\"vg_free_count\":\"25640\"}",
+       "              ]",
+       "          }",
+       "      ]",
+       "  }"
+    };
+
+    vector<string> output = {
+       "vg:{ vg-name:b vg-uuid:GbcwxM-Px5E-Xs7u-dLhx-r7RU-4LG4-uGR6Ew 
extent-size:4194304 extent-count:25640 free-extent-count:25640 }"
+    };
+
+    check("b", input, output);
+}

Reply via email to