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 2022-07-26 19:42:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng" Tue Jul 26 19:42:38 2022 rev:177 rq:991029 version:4.5.31 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2022-07-22 19:20:21.176570609 +0200 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1533/libstorage-ng.changes 2022-07-26 19:42:52.678142894 +0200 @@ -1,0 +2,8 @@ +Mon Jul 25 12:16:19 UTC 2022 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#891 +- added unit test +- fixed typo +- 4.5.31 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.5.30.tar.xz New: ---- libstorage-ng-4.5.31.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.xQX0Jq/_old 2022-07-26 19:42:53.158068733 +0200 +++ /var/tmp/diff_new_pack.xQX0Jq/_new 2022-07-26 19:42:53.162068115 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.5.30 +Version: 4.5.31 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.5.30.tar.xz -> libstorage-ng-4.5.31.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.30/VERSION new/libstorage-ng-4.5.31/VERSION --- old/libstorage-ng-4.5.30/VERSION 2022-07-21 10:04:51.000000000 +0200 +++ new/libstorage-ng-4.5.31/VERSION 2022-07-25 14:16:19.000000000 +0200 @@ -1 +1 @@ -4.5.30 +4.5.31 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.30/testsuite/Makefile.am new/libstorage-ng-4.5.31/testsuite/Makefile.am --- old/libstorage-ng-4.5.30/testsuite/Makefile.am 2022-07-21 10:04:51.000000000 +0200 +++ new/libstorage-ng-4.5.31/testsuite/Makefile.am 2022-07-25 14:16:19.000000000 +0200 @@ -19,7 +19,7 @@ md1.test md2.test md3.test md4.test md5.test encryption1.test \ encryption2.test lvm1.test lvm-pv-usable-size.test graphviz.test \ copy-individual.test mountpoint.test bcache1.test graph.test \ - restore.test set-source.test valid-names.test + restore.test set-source.test valid-names.test luks1.test AM_DEFAULT_SOURCE_EXT = .cc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.30/testsuite/encryption2.cc new/libstorage-ng-4.5.31/testsuite/encryption2.cc --- old/libstorage-ng-4.5.30/testsuite/encryption2.cc 2022-07-21 10:04:51.000000000 +0200 +++ new/libstorage-ng-4.5.31/testsuite/encryption2.cc 2022-07-25 14:16:19.000000000 +0200 @@ -48,7 +48,7 @@ const Devicegraph* probed = storage.get_probed(); { - // A luks with very small metadata header of with no header at all is + // A luks with very small metadata header or with no header at all is // acceptable (regression test for bsc#1120070 and bsc#1101870) BOOST_CHECK_NO_THROW(probed->check()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.30/testsuite/luks1.cc new/libstorage-ng-4.5.31/testsuite/luks1.cc --- old/libstorage-ng-4.5.30/testsuite/luks1.cc 1970-01-01 01:00:00.000000000 +0100 +++ new/libstorage-ng-4.5.31/testsuite/luks1.cc 2022-07-25 14:16:19.000000000 +0200 @@ -0,0 +1,49 @@ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE libstorage + +#include <boost/test/unit_test.hpp> + +#include "storage/Devices/DiskImpl.h" +#include "storage/Devices/LuksImpl.h" +#include "storage/Filesystems/Xfs.h" +#include "storage/Filesystems/MountPointImpl.h" +#include "storage/Devicegraph.h" +#include "storage/Storage.h" +#include "storage/Environment.h" +#include "storage/Utils/Region.h" + +using namespace std; +using namespace storage; + + +BOOST_AUTO_TEST_CASE(test1) +{ + set_logger(get_stdout_logger()); + + Environment environment(true, ProbeMode::NONE, TargetMode::DIRECT); + + Storage storage(environment); + + Devicegraph* staging = storage.get_staging(); + + Disk* sda = Disk::create(staging, "/dev/sda", Region(0, 5000000, 512)); + sda->get_impl().set_udev_ids({ "scsi-350014ee203733bb5" }); + + PartitionTable* gpt = sda->create_partition_table(PtType::GPT); + + Partition* sda1 = gpt->create_partition("/dev/sda1", Region(2048, 1000000, 512), PartitionType::PRIMARY); + + Luks* luks = to_luks(sda1->create_encryption("cr-test", EncryptionType::LUKS2)); + + Xfs* xfs = to_xfs(luks->create_blk_filesystem(FsType::XFS)); + + MountPoint* mount_point = xfs->create_mount_point("/test"); + + { + BOOST_CHECK_EQUAL(luks->get_impl().get_mount_by_name(MountByType::DEVICE), "/dev/sda1"); + BOOST_CHECK_EQUAL(luks->get_impl().get_mount_by_name(MountByType::ID), "/dev/disk/by-id/scsi-350014ee203733bb5-part1"); + + BOOST_CHECK_EQUAL(mount_point->get_impl().get_mount_by_name(), "/dev/mapper/cr-test"); + } +}