Hello community,

here is the log from the commit of package libstorage-ng for openSUSE:Factory 
checked in at 2018-09-04 22:51:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage-ng.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Tue Sep  4 22:51:29 2018 rev:32 rq:632799 version:4.1.22

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes      
2018-08-20 16:17:44.528680540 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new/libstorage-ng.changes 
2018-09-04 22:51:30.964045068 +0200
@@ -1,0 +2,76 @@
+Sun Sep 2 09:03:24 UTC 2018 - [email protected]
+
+- Translated using Weblate (Czech)
+- 4.1.22
+
+--------------------------------------------------------------------
+Tue Aug 28 13:57:38 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#566
+- merge branch SLE-15-GA
+- merge gh#openSUSE/libstorage-ng#554
+- merge gh#openSUSE/libstorage-ng#565
+- merge gh#openSUSE/libstorage-ng#560
+- merge gh#openSUSE/libstorage-ng#564
+- merge gh#openSUSE/libstorage-ng#562
+- detect correctly whether a file system is currently mounted
+  (bsc#1105227)
+- adjust multipath parser to accept nvme related output
+  (bsc#1089353)
+- Added some class descriptions
+- MdLinks: make it work also when even /dev/md does not exist
+- Avoid exceptions for inactive RAIDs (bsc#1090010)
+- Fixed the existing tests
+- test inactive noncontainer
+- detect raid containers differently
+- Mark inactive RAID in the BlkDevice attribute
+- A common way to configure the indentation style
+- Inactive raid
+- Merge SLE-15-GA into master
+- 4.1.21
+
+--------------------------------------------------------------------
+Fri Aug 24 11:05:35 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#560
+- adjust multipath parser to accept nvme related output
+  (bsc#1089353)
+- try to make multipath parser more robust
+- add unit tests
+- 4.1.20
+
+--------------------------------------------------------------------
+Thu Aug 23 12:27:09 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#562
+- detect correctly whether a file system is currently mounted
+  (bsc#1105227)
+- add unit tests
+- add spaces
+- 4.1.19
+
+--------------------------------------------------------------------
+Wed Aug 22 12:52:13 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#563
+- do not crash when parsing docker devices (bsc#1104899)
+- 4.1.18
+
+--------------------------------------------------------------------
+Wed Aug 22 07:36:42 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#561
+- Changed licence to GPL-2.0-only.
+- 4.1.17
+
+--------------------------------------------------------------------
+Tue Aug 21 14:23:18 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#548
+- RAID: states of operation
+- RAID docs: nicer formatting for the older notes
+- autodocs: ignore Doxygen search data
+- Don't surprise myself.
+- 4.1.16
+
+--------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.hEDREU/_old  2018-09-04 22:51:31.376046481 +0200
+++ /var/tmp/diff_new_pack.hEDREU/_new  2018-09-04 22:51:31.380046495 +0200
@@ -18,10 +18,10 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.1.15
+Version:        4.1.22
 Release:        0
 Summary:        Library for storage management
-License:        GPL-2.0
+License:        GPL-2.0-only
 Group:          System/Libraries
 Url:            http://github.com/openSUSE/libstorage-ng
 Source:         %{name}-%{version}.tar.xz

++++++ libstorage-ng-4.1.15.tar.xz -> libstorage-ng-4.1.22.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/.editorconfig 
new/libstorage-ng-4.1.22/.editorconfig
--- old/libstorage-ng-4.1.15/.editorconfig      1970-01-01 01:00:00.000000000 
+0100
+++ new/libstorage-ng-4.1.22/.editorconfig      2018-09-02 14:01:32.000000000 
+0200
@@ -0,0 +1,15 @@
+# https://EditorConfig.org  -*- ini -*-
+# This is a unified way to tell all your editors
+# about the proper indentation style in this repo.
+#
+# Emacs:   https://github.com/editorconfig/editorconfig-emacs#readme
+# Vim:     https://github.com/editorconfig/editorconfig-vim#readme
+# VS Code: 
https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
+
+# don't continue looking in upper directories, this is the top level
+root = true
+
+[*.{h,cc}]
+indent_style = tab
+indent_size = 4
+tab_width = 8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/VERSION 
new/libstorage-ng-4.1.22/VERSION
--- old/libstorage-ng-4.1.15/VERSION    2018-08-14 19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/VERSION    2018-09-02 14:01:32.000000000 +0200
@@ -1 +1 @@
-4.1.15
+4.1.22
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/doc/autodocs/.gitignore 
new/libstorage-ng-4.1.22/doc/autodocs/.gitignore
--- old/libstorage-ng-4.1.15/doc/autodocs/.gitignore    2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/doc/autodocs/.gitignore    2018-09-02 
14:01:32.000000000 +0200
@@ -1 +1,2 @@
 doxygen.timestamp
+search/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/doc/md-raid.md 
new/libstorage-ng-4.1.22/doc/md-raid.md
--- old/libstorage-ng-4.1.15/doc/md-raid.md     2018-08-14 19:01:00.000000000 
+0200
+++ new/libstorage-ng-4.1.22/doc/md-raid.md     2018-09-02 14:01:32.000000000 
+0200
@@ -1,3 +1,34 @@
+RAID
+====
+
+This is a collection of *various* notes.
+
+See also:
+- 
<https://www.suse.com/documentation/sles-15/book_storage/data/part_software_raid.html>
+- 
<https://www.suse.com/documentation/sles-15/book_storage/data/sec_raid_yast.html>
+
+States of Operation
+-------------------
+
+A RAID array, once it has been set up, has 3 possible states:
+
+1. working normally: all devices are present
+2. working but degraded: some devices are missing but the data is still
+   accessible
+3. not working: too many devices are missing
+
+Yes, it's a simplification. YaST simplifies this even more: it treats the two
+"working" states as the same.
+
+In SLE12, YaST just ignores non-working RAIDs. In SLE15, it pops up some
+warning dialogs (with a bug if I select Abort).
+
+YaST does not provide any assistance in recovering from a worse state to a
+better state. You have to be very careful with `mdadm` not to break things
+even further.
+
+Existing RAID Arrays
+--------------------
 
 For MD RAIDs already on disk only a few operations are supported:
 
@@ -7,42 +38,46 @@
 Unsupported are e.g. changing the RAID level, the chunk size or any operation
 changing the RAID size.
 
-Nested RAIDs are not supported. The reason is RAID auto assemble can ruin the
+Nested RAIDs
+------------
+
+Nested RAIDs are NOT supported. The reason is RAID auto assemble can ruin the
 game. E.g. after creating md0 and md1 there maybe old signatures on them and
 thus md2 is auto assembled before the library can wipe the signatures or
 create md2. Thus creating md2 fails due to md0 and md1 being busy.
 
+Naming
+------
 
 There are three name formats for MD RAIDs:
 
-- numeric, /dev/md<number>
+- numeric, /dev/md$NUMBER
 
-- format1 name, /dev/md/<name>
+- format1 name, /dev/md/$NAME
 
-  The device node itself is still numeric. A link from /dev/md/<name> to
-  /dev/md<number> exists.
+  The device node itself is still numeric. A link from /dev/md/$NAME to
+  /dev/md$NUMBER exists.
 
-- format2 name, /dev/md_<name>
+- format2 name, /dev/md_$NAME
 
-  There is no numeric device node. A link from /dev/md/<name> to
-  /dev/md_<name> exists.
+  There is no numeric device node. A link from /dev/md/$NAME to
+  /dev/md_$NAME exists.
 
-  Needs "CREATE names=yes" in /etc/mdadm.conf.
+  Needs `CREATE names=yes` in /etc/mdadm.conf.
 
 The library uses the numeric or the format1 name as the name of the Md object.
-So either use Md::create(devicegraph, "/dev/md0") or Md::create(devicegraph,
-"/dev/md/test") when creating MD RAIDs.
-
+So either use `Md::create(devicegraph, "/dev/md0")` or
+`Md::create(devicegraph, "/dev/md/test")` when creating MD RAIDs.
 
 Renaming existing MD RAIDs is not supported.
 
-Support for "CREATE names=yes" in /etc/mdadm.conf should works but is
+Support for `CREATE names=yes` in /etc/mdadm.conf should works but is
 not supported due to missing testing from QA.
 
-
 BIOS RAIDs
+----------
 
-Some BIOS RAIDs (IMSM and DDF) can be handled by mdadm as MD RAIDs. For each
+Some BIOS RAIDs (IMSM and DDF) can be handled by `mdadm` as MD RAIDs. For each
 of these RAIDs a container device exists in the system. The container device
 has type MdContainer and the RAIDs inside the container have type
 MdMember. Modifying (even deleting) BIOS RAIDs is not supported.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/libstorage-ng.spec.in 
new/libstorage-ng-4.1.22/libstorage-ng.spec.in
--- old/libstorage-ng-4.1.15/libstorage-ng.spec.in      2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/libstorage-ng.spec.in      2018-09-02 
14:01:32.000000000 +0200
@@ -21,7 +21,7 @@
 Version:        @VERSION@
 Release:        0
 Summary:        Library for storage management
-License:        GPL-2.0
+License:        GPL-2.0-only
 Group:          System/Libraries
 Url:            http://github.com/openSUSE/libstorage-ng
 Source:         libstorage-ng-%{version}.tar.xz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/po/cs.po 
new/libstorage-ng-4.1.22/po/cs.po
--- old/libstorage-ng-4.1.15/po/cs.po   2018-08-14 19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/po/cs.po   2018-09-02 14:01:32.000000000 +0200
@@ -13,7 +13,7 @@
 "Project-Id-Version: YaST (@memory@)\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2018-08-08 10:57+0200\n"
-"PO-Revision-Date: 2018-08-13 19:01+0000\n"
+"PO-Revision-Date: 2018-09-02 12:01+0000\n"
 "Last-Translator: Aleš Kastner <[email protected]>\n"
 "Language-Team: Czech <https://l10n.opensuse.org/projects/libstorage/ng-";
 "master/cs/>\n"
@@ -1636,17 +1636,17 @@
 #. TRANSLATORS: error message
 #, fuzzy, c-format
 msgid "Probing Stray Block Device %s failed"
-msgstr "Test extra blokového zařízení %s selhal"
+msgstr "Test bludného bloku na zařízení %s selhal"
 
 #. TRANSLATORS: progress message
 #, fuzzy
 msgid "Probing Stray Block Devices"
-msgstr "Testuji extra blokové zařízení"
+msgstr "Testuji bludné bloky na zařízeních"
 
 #. TRANSLATORS: error message
 #, fuzzy
 msgid "Probing Stray Block Devices failed"
-msgstr "Test extra blokového zařízení selhal"
+msgstr "Test bludných bloků na zařízeních selhal"
 
 #. TRANSLATORS: progress message
 msgid "Probing bcache"
@@ -2129,7 +2129,7 @@
 #. TRANSLATORS: name of object
 #, fuzzy
 msgid "Stray Block Device"
-msgstr "Extra blokové zařízení"
+msgstr "Zařízení s bludnými bloky"
 
 #. TRANSLATORS: name of object
 msgid "Swap"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/storage/Devices/MdImpl.cc 
new/libstorage-ng-4.1.22/storage/Devices/MdImpl.cc
--- old/libstorage-ng-4.1.15/storage/Devices/MdImpl.cc  2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/Devices/MdImpl.cc  2018-09-02 
14:01:32.000000000 +0200
@@ -375,6 +375,7 @@
     Md::Impl::probe_mds(Prober& prober)
     {
        SystemInfo& system_info = prober.get_system_info();
+       const MdLinks& md_links = system_info.getMdLinks();
 
        for (const string& short_name : prober.get_sys_block_entries().mds)
        {
@@ -383,8 +384,20 @@
            try
            {
                const MdadmDetail& mdadm_detail = 
system_info.getMdadmDetail(name);
+
                if (!mdadm_detail.devname.empty())
-                   name = DEV_MD_DIR "/" + mdadm_detail.devname;
+               {
+                   MdLinks::const_iterator it = md_links.find(short_name);
+                   if (it != md_links.end())
+                   {
+                       // the mapping is backwards so we must iterate the 
result
+                       const vector<string>& links = it->second;
+                       if (std::find(links.begin(), links.end(), 
mdadm_detail.devname) != links.end())
+                       {
+                           name = DEV_MD_DIR "/" + mdadm_detail.devname;
+                       }
+                   }
+               }
 
                const ProcMdstat::Entry& entry = 
system_info.getProcMdstat().get_entry(short_name);
 
@@ -401,6 +414,7 @@
                else
                {
                    Md* md = Md::create(prober.get_system(), name);
+                   md->get_impl().set_active(!entry.inactive);
                    md->get_impl().probe_pass_1a(prober);
                }
            }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/storage/EtcFstab.cc 
new/libstorage-ng-4.1.22/storage/EtcFstab.cc
--- old/libstorage-ng-4.1.15/storage/EtcFstab.cc        2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/EtcFstab.cc        2018-09-02 
14:01:32.000000000 +0200
@@ -196,12 +196,11 @@
                            const string & mount_point,
                            FsType         fs_type ):
        device( device ),
-       mount_point( mount_point ),
        fs_type( fs_type ),
        dump_pass( 0 ),
        fsck_pass( 0 )
     {
-
+        set_mount_point(mount_point);
     }
 
 
@@ -210,6 +209,10 @@
 
     }
 
+    void FstabEntry::set_mount_point( const string & new_val )
+    {
+        _mount_point = MountPoint::normalize_path(new_val);
+    }
 
     bool FstabEntry::validate()
     {
@@ -218,10 +221,10 @@
         if ( device.empty() )
         {
             ok = false;
-            y2err( "No device specified for entry " << mount_point );
+            y2err( "No device specified for entry " << get_mount_point() );
         }
 
-        if ( mount_point.empty() )
+        if ( get_mount_point().empty() )
         {
             ok = false;
             y2err( "No mount point specified for entry " << device );
@@ -237,7 +240,7 @@
 
        int col = 0;
        set_column( col++, EtcFstab::fstab_encode( device      ) );
-       set_column( col++, EtcFstab::fstab_encode( mount_point ) );
+       set_column( col++, EtcFstab::fstab_encode( get_mount_point() ) );
 
         if ( fs_type != FsType::UNKNOWN )
             set_column( col++, toString( fs_type ) );
@@ -247,7 +250,7 @@
                 col++; // just leave the old content
             else
             {
-                y2err( "File system type unknown for " << device << " at " << 
mount_point );
+                y2err( "File system type unknown for " << device << " at " << 
get_mount_point() );
                 set_column( col++, "unknown" );
             }
         }
@@ -275,7 +278,7 @@
 
        int col = 0;
        device      = EtcFstab::fstab_decode( get_column( col++ ) );
-       mount_point = EtcFstab::fstab_decode( get_column( col++ ) );
+       set_mount_point( EtcFstab::fstab_decode( get_column( col++ ) ) );
 
        bool ok = toValue( get_column( col++ ), fs_type );
 
@@ -603,12 +606,12 @@
     string
     JointEntry::get_mount_point() const
     {
-       if (fstab_entry)
-           return fstab_entry->get_mount_point();
-
        if (mount_entry)
            return mount_entry->get_mount_point();
 
+       if (fstab_entry)
+           return fstab_entry->get_mount_point();
+
        ST_THROW(Exception("neither fstab nor mount entry set"));
     }
 
@@ -688,7 +691,14 @@
            string path = mount_entry->get_mount_point();
 
            vector<JointEntry>::iterator it = find_if(ret.begin(), ret.end(), 
[&path](const JointEntry& tmp) {
-               return tmp.is_in_etc_fstab() && 
tmp.fstab_entry->get_mount_point() == path;
+                bool in_fstab = tmp.is_in_etc_fstab();
+                if (in_fstab && tmp.fstab_entry->get_mount_point() != path)
+                {
+                    y2war("mount points for " << tmp.fstab_entry->get_device()
+                          << " differ: fstab(" << 
tmp.fstab_entry->get_mount_point()
+                          << ") != proc(" << path << ")");
+                }
+               return in_fstab;
            });
 
            if (it != ret.end())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/storage/EtcFstab.h 
new/libstorage-ng-4.1.22/storage/EtcFstab.h
--- old/libstorage-ng-4.1.15/storage/EtcFstab.h 2018-08-14 19:01:00.000000000 
+0200
+++ new/libstorage-ng-4.1.22/storage/EtcFstab.h 2018-09-02 14:01:32.000000000 
+0200
@@ -249,7 +249,7 @@
        // Getters; see man fstab(5)
 
        const string &    get_device()      const { return device;      }
-       const string &    get_mount_point() const { return mount_point; }
+       const string &    get_mount_point() const { return _mount_point; }
        FsType            get_fs_type()     const { return fs_type;     }
        const MountOpts & get_mount_opts()  const { return mount_opts;  }
        int               get_dump_pass()   const { return dump_pass;   }
@@ -258,7 +258,7 @@
        // Setters
 
        void set_device     ( const string &    new_val ) { device      = 
new_val; }
-       void set_mount_point( const string &    new_val ) { mount_point = 
new_val; }
+       void set_mount_point( const string &    new_val );
        void set_fs_type    ( FsType            new_val ) { fs_type     = 
new_val; }
        void set_mount_opts ( const MountOpts & new_val ) { mount_opts  = 
new_val; }
        void set_dump_pass  ( int               new_val ) { dump_pass   = 
new_val; }
@@ -272,7 +272,7 @@
     private:
 
        string    device;       // including UUID= or LABEL=
-       string    mount_point;
+       string    _mount_point; // always use get/set_mount_point()
        FsType    fs_type;      // see Filesystems/Filesystem.h
        MountOpts mount_opts;
        int       dump_pass;    // historic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/storage/Filesystems/MountPoint.cc 
new/libstorage-ng-4.1.22/storage/Filesystems/MountPoint.cc
--- old/libstorage-ng-4.1.15/storage/Filesystems/MountPoint.cc  2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/Filesystems/MountPoint.cc  2018-09-02 
14:01:32.000000000 +0200
@@ -74,6 +74,33 @@
     }
 
 
+    // Notes
+    //
+    // - boost::filesystem::path::canonical() is not what we want as this
+    //   works with existing files (ours might not yet exist) and resolves
+    //   symlinks (which is too restrictive)
+    //
+    // - boost::filesystem::path::lexically_normal() is also not what we
+    //   want as it behaves a bit weird for our purpose; it changes e.g.
+    //   '/foo/' into '/foo/.'
+    //
+    // - if you change this function keep in mind that 'swap' is a special
+    //   valid path argument in libstorage-ng
+    //
+    string
+    MountPoint::normalize_path(const string& path)
+    {
+        string tmp = regex_replace(path, regex("/+"), "/");
+
+        if (tmp != "/")
+        {
+            tmp = regex_replace(tmp, regex("/$"), "");
+        }
+
+       return tmp;
+    }
+
+
     MountByType
     MountPoint::get_mount_by() const
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/storage/Filesystems/MountPoint.h 
new/libstorage-ng-4.1.22/storage/Filesystems/MountPoint.h
--- old/libstorage-ng-4.1.15/storage/Filesystems/MountPoint.h   2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/Filesystems/MountPoint.h   2018-09-02 
14:01:32.000000000 +0200
@@ -67,6 +67,11 @@
        void set_path(const std::string& path);
 
        /**
+        * Return normalized form of path.
+        */
+       static std::string normalize_path(const std::string& path);
+
+       /**
         * Get the mount-by method.
         */
        MountByType get_mount_by() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/storage/Filesystems/MountPointImpl.cc 
new/libstorage-ng-4.1.22/storage/Filesystems/MountPointImpl.cc
--- old/libstorage-ng-4.1.15/storage/Filesystems/MountPointImpl.cc      
2018-08-14 19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/Filesystems/MountPointImpl.cc      
2018-09-02 14:01:32.000000000 +0200
@@ -49,13 +49,14 @@
 
 
     MountPoint::Impl::Impl(const string& path)
-       : Device::Impl(), path(path), mount_by(MountByType::DEVICE), 
mount_type(FsType::UNKNOWN),
+       : Device::Impl(), mount_by(MountByType::DEVICE), 
mount_type(FsType::UNKNOWN),
          freq(0), passno(0), active(true), in_etc_fstab(true)
     {
 #if 0
        if (!valid_path(path))
            ST_THROW(InvalidMountPointPath(path));
 #endif
+       set_path(path);
     }
 
 
@@ -65,7 +66,8 @@
     {
        string tmp;
 
-       getChildValue(node, "path", path);
+       if (getChildValue(node, "path", tmp))
+           set_path(tmp);
 
        if (getChildValue(node, "mount-by", tmp))
            mount_by = toValueWithFallback(tmp, MountByType::DEVICE);
@@ -136,7 +138,7 @@
            ST_THROW(InvalidMountPointPath(path));
 #endif
 
-       Impl::path = path;
+       Impl::path = normalize_path(path);
     }
 
 
@@ -147,13 +149,6 @@
     }
 
 
-    string
-    MountPoint::Impl::normalize_path(const string& path)
-    {
-       return path;            // TODO
-    }
-
-
     string
     MountPoint::Impl::get_displayname() const
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/storage/Filesystems/MountPointImpl.h 
new/libstorage-ng-4.1.22/storage/Filesystems/MountPointImpl.h
--- old/libstorage-ng-4.1.15/storage/Filesystems/MountPointImpl.h       
2018-08-14 19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/Filesystems/MountPointImpl.h       
2018-09-02 14:01:32.000000000 +0200
@@ -57,7 +57,6 @@
        virtual ResizeInfo detect_resize_info() const override;
 
        static bool valid_path(const string& path);
-       static string normalize_path(const string& path);
 
        const string& get_path() const { return path; }
        void set_path(const string& path);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/storage/SystemInfo/CmdBlkid.cc 
new/libstorage-ng-4.1.22/storage/SystemInfo/CmdBlkid.cc
--- old/libstorage-ng-4.1.15/storage/SystemInfo/CmdBlkid.cc     2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/SystemInfo/CmdBlkid.cc     2018-09-02 
14:01:32.000000000 +0200
@@ -60,7 +60,7 @@
 
        for (vector<string>::const_iterator it = lines.begin(); it != 
lines.end(); ++it)
        {
-           string::size_type pos = it->find(":");
+           string::size_type pos = it->find(": ");
            if (pos == string::npos)
                continue;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/storage/SystemInfo/CmdBlkid.h 
new/libstorage-ng-4.1.22/storage/SystemInfo/CmdBlkid.h
--- old/libstorage-ng-4.1.15/storage/SystemInfo/CmdBlkid.h      2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/SystemInfo/CmdBlkid.h      2018-09-02 
14:01:32.000000000 +0200
@@ -42,6 +42,9 @@
     class SystemInfo;
 
 
+    /**
+     * Run and parse the "blkid" command.
+     */
     class Blkid
     {
     public:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/storage/SystemInfo/CmdMultipath.cc 
new/libstorage-ng-4.1.22/storage/SystemInfo/CmdMultipath.cc
--- old/libstorage-ng-4.1.15/storage/SystemInfo/CmdMultipath.cc 2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/SystemInfo/CmdMultipath.cc 2018-09-02 
14:01:32.000000000 +0200
@@ -66,10 +66,32 @@
            string line = *it1;
            y2mil("mp line:" << line);
 
-           if (boost::starts_with(line, "create:"))
+            // not the kind of line we are looking for
+           if (!valid_section_start(line))
+           {
+               ++it1;
+               continue;
+           }
+
+            // ignore entries not intended for dm-multipath
+            if (boost::contains(line, " [nvme]:"))
+            {
+                ++it1;
+                continue;
+            }
+
+            // lines sometimes start with these; remove them
+           if (boost::starts_with(line, "create: ") || 
boost::starts_with(line, ": "))
                line = extractNthWord(1, line, true);
 
            string name = extractNthWord(0, line);
+
+            if(name.empty())
+            {
+                ++it1;
+                continue;
+            }
+
            y2mil("mp name:" << name);
 
            bool has_alias = boost::starts_with(extractNthWord(1, line), "(");
@@ -84,12 +106,12 @@
 
            ++it1;
 
-           if (it1 != lines.end())
+           if (it1 != lines.end() && !valid_section_start(*it1))
                ++it1;
 
            while (it1 != lines.end())
            {
-               if (it1->empty() || isalnum((*it1)[0]))
+               if (it1->empty() || valid_section_start(*it1))
                    break;
 
                if (regex_search(*it1, lun))
@@ -111,6 +133,20 @@
     }
 
 
+    bool
+    CmdMultipath::valid_section_start(const string& line)
+    {
+        // It's not really clear what kind of line starts a new section (a
+        // new multipath device description) in the output of 'multipath -d -v 
2'.
+        if (boost::contains(line, ","))
+        {
+           return true;
+        }
+
+        return false;
+    }
+
+
     vector<string>
     CmdMultipath::get_entries() const
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/storage/SystemInfo/CmdMultipath.h 
new/libstorage-ng-4.1.22/storage/SystemInfo/CmdMultipath.h
--- old/libstorage-ng-4.1.15/storage/SystemInfo/CmdMultipath.h  2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/SystemInfo/CmdMultipath.h  2018-09-02 
14:01:32.000000000 +0200
@@ -68,6 +68,7 @@
     private:
 
        void parse(const vector<string>& lines);
+        bool valid_section_start(const string& line);
 
        map<string, Entry> data;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/storage/SystemInfo/DevAndSys.cc 
new/libstorage-ng-4.1.22/storage/SystemInfo/DevAndSys.cc
--- old/libstorage-ng-4.1.15/storage/SystemInfo/DevAndSys.cc    2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/SystemInfo/DevAndSys.cc    2018-09-02 
14:01:32.000000000 +0200
@@ -221,7 +221,16 @@
 
     MdLinks::MdLinks()
     {
-       map<string, string> links = getDirLinks("/dev/md");
+        map<string, string> links;
+       try
+       {
+           links = getDirLinks("/dev/md");
+       }
+       catch (const Exception&)
+       {
+           // OK, no /dev/md at all
+       }
+
        for (const map<string, string>::value_type& it : links)
        {
            string::size_type pos = it.second.find_first_not_of("./");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/storage/SystemInfo/DevAndSys.h 
new/libstorage-ng-4.1.22/storage/SystemInfo/DevAndSys.h
--- old/libstorage-ng-4.1.15/storage/SystemInfo/DevAndSys.h     2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/SystemInfo/DevAndSys.h     2018-09-02 
14:01:32.000000000 +0200
@@ -41,6 +41,9 @@
     using std::map;
 
 
+    /**
+     * A sequence of file names found in a pathname.
+     */
     class Dir
     {
     public:
@@ -67,6 +70,11 @@
     };
 
 
+    /**
+     * A sequence of lines, constructed from a pathname.
+     *
+     * Trailing newlines are not included.
+     */
     class File
     {
     public:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/storage/SystemInfo/ProcMdstat.cc 
new/libstorage-ng-4.1.22/storage/SystemInfo/ProcMdstat.cc
--- old/libstorage-ng-4.1.15/storage/SystemInfo/ProcMdstat.cc   2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/SystemInfo/ProcMdstat.cc   2018-09-02 
14:01:32.000000000 +0200
@@ -113,10 +113,6 @@
            if( (pos=line.find_first_not_of( app_ws ))!=string::npos && pos!=0 )
                line.erase( 0, pos );
        }
-       else
-       {
-           entry.is_container = true;
-       }
 
        while( (pos=line.find_first_not_of( app_ws ))==0 )
        {
@@ -161,6 +157,10 @@
            string::size_type pos2 = line2.find_first_of(app_ws, pos1);
            entry.super = string(line2, pos1, pos2 - pos1);
 
+           if (entry.super == "external:ddf" || entry.super == "external:imsm")
+           {
+               entry.is_container = true;
+           }
            if (!entry.is_container && boost::starts_with(entry.super, 
"external:"))
            {
                string::size_type pos1 = entry.super.find_first_of("/");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/storage/SystemInfo/ProcMdstat.h 
new/libstorage-ng-4.1.22/storage/SystemInfo/ProcMdstat.h
--- old/libstorage-ng-4.1.15/storage/SystemInfo/ProcMdstat.h    2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/SystemInfo/ProcMdstat.h    2018-09-02 
14:01:32.000000000 +0200
@@ -110,7 +110,9 @@
 
     };
 
-
+    /**
+     * Parse (the --export variant of) mdadm --detail
+     */
     class MdadmDetail
     {
     public:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/storage/SystemInfo/SystemInfo.h 
new/libstorage-ng-4.1.22/storage/SystemInfo/SystemInfo.h
--- old/libstorage-ng-4.1.15/storage/SystemInfo/SystemInfo.h    2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/SystemInfo/SystemInfo.h    2018-09-02 
14:01:32.000000000 +0200
@@ -55,7 +55,9 @@
 {
     using std::map;
 
-
+    /**
+     * Encapsulates system access, also for testsuite mocking
+     */
     class SystemInfo : private boost::noncopyable
     {
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/storage/Utils/Remote.h 
new/libstorage-ng-4.1.22/storage/Utils/Remote.h
--- old/libstorage-ng-4.1.15/storage/Utils/Remote.h     2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/storage/Utils/Remote.h     2018-09-02 
14:01:32.000000000 +0200
@@ -34,6 +34,9 @@
 namespace storage
 {
 
+    /**
+     * A result of an unnamed command: stdout + stderr + exit_code.
+     */
     struct RemoteCommand
     {
        RemoteCommand() : stdout(), stderr(), exit_code(0) {}
@@ -49,6 +52,9 @@
     };
 
 
+    /**
+     * Contents of an unnamed file (vector of lines)
+     */
     struct RemoteFile
     {
        RemoteFile() : content() {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/testsuite/Makefile.am 
new/libstorage-ng-4.1.22/testsuite/Makefile.am
--- old/libstorage-ng-4.1.15/testsuite/Makefile.am      2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/testsuite/Makefile.am      2018-09-02 
14:01:32.000000000 +0200
@@ -16,7 +16,7 @@
        output.test probe.test range.test stable.test relatives.test            
\
        mount-opts.test etc-mdadm.test mount-by.test btrfs.test md1.test        
\
        md2.test md3.test md4.test encryption1.test lvm1.test graphviz.test     
\
-       copy-individual.test
+       copy-individual.test mountpoint.test
 
 AM_DEFAULT_SOURCE_EXT = .cc
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/testsuite/SystemInfo/blkid.cc 
new/libstorage-ng-4.1.22/testsuite/SystemInfo/blkid.cc
--- old/libstorage-ng-4.1.15/testsuite/SystemInfo/blkid.cc      2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/testsuite/SystemInfo/blkid.cc      2018-09-02 
14:01:32.000000000 +0200
@@ -42,10 +42,12 @@
        "/dev/mapper/system-btrfs: LABEL=\"BTRFS\" 
UUID=\"946de1e3-ab5a-49d2-8c9d-057f1613d395\" 
UUID_SUB=\"8fd5c226-d060-4049-90e6-1df5c865fdf4\" TYPE=\"btrfs\" ",
        "/dev/mapper/system-giant: LABEL=\"GIANT\" 
UUID=\"0857a01f-c58e-464a-b74b-cd46992873e7\" TYPE=\"xfs\" ",
        "/dev/mapper/system-root: LABEL=\"ROOT\" 
UUID=\"31e381c9-5b35-4045-8d01-9274a30e1298\" TYPE=\"ext3\" ",
-       "/dev/mapper/system-swap: LABEL=\"SWAP\" 
UUID=\"fd39c3f9-2990-435d-8eed-e56b6dc2e592\" TYPE=\"swap\" "
+       "/dev/mapper/system-swap: LABEL=\"SWAP\" 
UUID=\"fd39c3f9-2990-435d-8eed-e56b6dc2e592\" TYPE=\"swap\" ",
+       "/dev/mapper/docker-254:3-266193-pool: 
UUID=\"b8965f68-1e7c-4fac-982b-5859dca91de5\" TYPE=\"ext4\" "
     };
 
     vector<string> output = {
+       "data[/dev/mapper/docker-254:3-266193-pool] -> is-fs:true fs-type:ext4 
fs-uuid:b8965f68-1e7c-4fac-982b-5859dca91de5",
        "data[/dev/mapper/system-abuild] -> is-fs:true fs-type:ext4 
fs-uuid:16337c60-fc2a-4b87-8199-4f511fa06c65 fs-label:ABUILD",
        "data[/dev/mapper/system-btrfs] -> is-fs:true fs-type:btrfs 
fs-uuid:946de1e3-ab5a-49d2-8c9d-057f1613d395 fs-label:BTRFS",
        "data[/dev/mapper/system-giant] -> is-fs:true fs-type:xfs 
fs-uuid:0857a01f-c58e-464a-b74b-cd46992873e7 fs-label:GIANT",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/testsuite/SystemInfo/mdlinks.cc 
new/libstorage-ng-4.1.22/testsuite/SystemInfo/mdlinks.cc
--- old/libstorage-ng-4.1.15/testsuite/SystemInfo/mdlinks.cc    2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/testsuite/SystemInfo/mdlinks.cc    2018-09-02 
14:01:32.000000000 +0200
@@ -2,8 +2,8 @@
 #define BOOST_TEST_DYN_LINK
 #define BOOST_TEST_MODULE libstorage
 
+#include <numeric>
 #include <boost/test/unit_test.hpp>
-#include <boost/algorithm/string.hpp>
 
 #include "storage/SystemInfo/DevAndSys.h"
 #include "storage/Utils/Mockup.h"
@@ -28,11 +28,31 @@
     parsed << mdlinks;
 
     string lhs = parsed.str();
-    string rhs = boost::join(output, "\n") + "\n";
+    string rhs = accumulate(output.begin(), output.end(), ""s,
+                            [](auto a, auto b) { return a + b + "\n"; });
 
     BOOST_CHECK_EQUAL(lhs, rhs);
 }
 
+void
+check_error(const vector<string>& input, const vector<string>& error_input, 
const vector<string>& output)
+{
+    Mockup::set_mode(Mockup::Mode::PLAYBACK);
+    Mockup::Command command(input, error_input, 1);
+    Mockup::set_command(LSBIN " -1l --sort=none " + quote("/dev/md"), command);
+
+    MdLinks mdlinks;
+
+    ostringstream parsed;
+    parsed.setf(std::ios::boolalpha);
+    parsed << mdlinks;
+
+    string lhs = parsed.str();
+    string rhs = accumulate(output.begin(), output.end(), ""s,
+                            [](auto a, auto b) { return a + b + "\n"; });
+
+    BOOST_CHECK_EQUAL(lhs, rhs);
+}
 
 BOOST_AUTO_TEST_CASE(parse1)
 {
@@ -48,5 +68,18 @@
     check(input, output);
 }
 
+BOOST_AUTO_TEST_CASE(parse_missing)
+{
+    vector<string> input = {};
+
+    vector<string> error_input = {
+        "/bin/ls: cannot access '/dev/md': No such file or directory"
+    };
+
+    vector<string> output = {};
+
+    check_error(input, error_input, output);
+}
+
 
 // TODO tests with strange characters in paths
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/testsuite/SystemInfo/multipath.cc 
new/libstorage-ng-4.1.22/testsuite/SystemInfo/multipath.cc
--- old/libstorage-ng-4.1.15/testsuite/SystemInfo/multipath.cc  2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/testsuite/SystemInfo/multipath.cc  2018-09-02 
14:01:32.000000000 +0200
@@ -79,3 +79,66 @@
 
     check(input, output);
 }
+
+
+// entries might be prefixed with ': '
+BOOST_AUTO_TEST_CASE(parse3)
+{
+    vector<string> input = {
+       ": QEMU_HARDDISK_38ffda4567ec4e2785ab dm-0 ATA,QEMU HARDDISK",
+       "size=60G features='0' hwhandler='0' wp=rw",
+       "|-+- policy='service-time 0' prio=1 status=active",
+       "| `- 0:0:0:0 sda 8:0  active ready running",
+       "`-+- policy='service-time 0' prio=1 status=enabled",
+       "  `- 0:0:1:0 sdb 8:16 active ready running"
+    };
+
+    vector<string> output = {
+       "data[QEMU_HARDDISK_38ffda4567ec4e2785ab] -> vendor:ATA model:QEMU 
HARDDISK devices:</dev/sda /dev/sdb>"
+    };
+
+    check(input, output);
+}
+
+
+// entries might be prefixed with 'create: '
+BOOST_AUTO_TEST_CASE(parse4)
+{
+    vector<string> input = {
+       "create: QEMU_HARDDISK_38ffda4567ec4e2785ab dm-0 ATA,QEMU HARDDISK",
+       "size=60G features='0' hwhandler='0' wp=rw",
+       "|-+- policy='service-time 0' prio=1 status=active",
+       "| `- 0:0:0:0 sda 8:0  active ready running",
+       "`-+- policy='service-time 0' prio=1 status=enabled",
+       "  `- 0:0:1:0 sdb 8:16 active ready running"
+    };
+
+    vector<string> output = {
+       "data[QEMU_HARDDISK_38ffda4567ec4e2785ab] -> vendor:ATA model:QEMU 
HARDDISK devices:</dev/sda /dev/sdb>"
+    };
+
+    check(input, output);
+}
+
+
+// nvme entries are ignored
+BOOST_AUTO_TEST_CASE(parse5)
+{
+    vector<string> input = {
+       "nvme-subsys0:NQN:nqn.2014.08.org.nvmexpress:19e519e5032BEHFSH7001190   
 HWE36P43016M000N                         
(nvme.19e5-30333242454846534837303031313930-48574533365034333031364d3030304e-00000001)
 [nvme]:nvme0n1 NVMe,HWE36P43016M000N,2.52",
+       "size=3125627568 features='n/a' hwhandler='n/a' wp=rw",
+       "`-+- policy='n/a' prio=n/a status=n/a",
+       "QEMU_HARDDISK_38ffda4567ec4e2785ab dm-0 ATA,QEMU HARDDISK",
+       "size=60G features='0' hwhandler='0' wp=rw",
+       "|-+- policy='service-time 0' prio=1 status=active",
+       "| `- 0:0:0:0 sda 8:0  active ready running",
+       "`-+- policy='service-time 0' prio=1 status=enabled",
+       "  `- 0:0:1:0 sdb 8:16 active ready running"
+    };
+
+    vector<string> output = {
+       "data[QEMU_HARDDISK_38ffda4567ec4e2785ab] -> vendor:ATA model:QEMU 
HARDDISK devices:</dev/sda /dev/sdb>"
+    };
+
+    check(input, output);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/testsuite/SystemInfo/proc-mdstat.cc 
new/libstorage-ng-4.1.22/testsuite/SystemInfo/proc-mdstat.cc
--- old/libstorage-ng-4.1.15/testsuite/SystemInfo/proc-mdstat.cc        
2018-08-14 19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/testsuite/SystemInfo/proc-mdstat.cc        
2018-09-02 14:01:32.000000000 +0200
@@ -138,3 +138,25 @@
 
     check(input, output);
 }
+
+BOOST_AUTO_TEST_CASE(parse_inactive_noncontainer)
+{
+    vector<string> input = {
+       "Personalities : [raid6] [raid5] [raid4] ",
+       "md126 : inactive sde1[0](S)",
+       "      101340 blocks super 1.0",
+       "       ",
+       "md127 : active raid5 sdb1[5] sdc1[1] sda1[4]",
+       "      2094848 blocks super 1.0 level 5, 128k chunk, algorithm 2 [3/3] 
[UUU]",
+       "      bitmap: 0/1 pages [0KB], 65536KB chunk",
+       "",
+       "unused devices: <none>"
+    };
+
+    vector<string> output = {
+       "data[md126] -> md-level:unknown super:1.0 size:103772160 read-only 
inactive devices:</dev/sde1(S)>",
+       "data[md127] -> md-level:RAID5 md-parity:left-symmetric super:1.0 
chunk-size:131072 size:2145124352 devices:</dev/sda1 /dev/sdb1 /dev/sdc1>"
+    };
+
+    check(input, output);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/testsuite/mountpoint.cc 
new/libstorage-ng-4.1.22/testsuite/mountpoint.cc
--- old/libstorage-ng-4.1.15/testsuite/mountpoint.cc    1970-01-01 
01:00:00.000000000 +0100
+++ new/libstorage-ng-4.1.22/testsuite/mountpoint.cc    2018-09-02 
14:01:32.000000000 +0200
@@ -0,0 +1,33 @@
+
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MODULE libstorage
+
+#include <boost/test/unit_test.hpp>
+
+#include "storage/Filesystems/MountPoint.h"
+
+
+using namespace storage;
+
+
+BOOST_AUTO_TEST_CASE(normalize_path)
+{
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "" ), "" );
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "swap" ), "swap" );
+
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "/" ), "/" );
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "/foo" ), "/foo" );
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "/foo/bar" ), "/foo/bar" );
+
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "///foo" ), "/foo" );
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "///foo/" ), "/foo" );
+
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "//foo/bar" ), "/foo/bar" );
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "///foo///bar" ), 
"/foo/bar" );
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "///foo///bar//" ), 
"/foo/bar" );
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "///foo///bar//" ), 
"/foo/bar" );
+
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "////foo///bar/." ), 
"/foo/bar/." );
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "////foo///bar/.." ), 
"/foo/bar/.." );
+    BOOST_CHECK_EQUAL( MountPoint::normalize_path( "////foo//..///./bar//" ), 
"/foo/.././bar" );
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/testsuite/probe/md-ddf1-mockup.xml 
new/libstorage-ng-4.1.22/testsuite/probe/md-ddf1-mockup.xml
--- old/libstorage-ng-4.1.15/testsuite/probe/md-ddf1-mockup.xml 2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/testsuite/probe/md-ddf1-mockup.xml 2018-09-02 
14:01:32.000000000 +0200
@@ -14,6 +14,13 @@
       <stdout>sda</stdout>
     </Command>
     <Command>
+      <name>/bin/ls -1l --sort=none '/dev/md'</name>
+      <stdout>total 0</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:41 a -> ../md126</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:41 b -> ../md125</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:31 ddf0 -> ../md127</stdout>
+    </Command>
+    <Command>
       <name>/sbin/blkid -c '/dev/null'</name>
       <stdout>/dev/sda1: UUID="691eb75f-2f8f-4ec9-8515-60b34237bd6d" 
TYPE="swap" PARTUUID="321b4d22-01"</stdout>
       <stdout>/dev/sda2: UUID="4d2e6fde-d105-4f15-b8e1-4173badc8c66" 
TYPE="ext4" PTTYPE="dos" PARTUUID="321b4d22-02"</stdout>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.1.15/testsuite/probe/md-imsm1-mockup.xml 
new/libstorage-ng-4.1.22/testsuite/probe/md-imsm1-mockup.xml
--- old/libstorage-ng-4.1.15/testsuite/probe/md-imsm1-mockup.xml        
2018-08-14 19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/testsuite/probe/md-imsm1-mockup.xml        
2018-09-02 14:01:32.000000000 +0200
@@ -14,6 +14,13 @@
       <stdout>sda</stdout>
     </Command>
     <Command>
+      <name>/bin/ls -1l --sort=none '/dev/md'</name>
+      <stdout>total 0</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:41 a -> ../md126</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:41 b -> ../md125</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:41 imsm0 -> ../md127</stdout>
+    </Command>
+    <Command>
       <name>/sbin/blkid -c '/dev/null'</name>
       <stdout>/dev/sda1: UUID="691eb75f-2f8f-4ec9-8515-60b34237bd6d" 
TYPE="swap" PARTUUID="321b4d22-01"</stdout>
       <stdout>/dev/sda2: UUID="4d2e6fde-d105-4f15-b8e1-4173badc8c66" 
TYPE="ext4" PTTYPE="dos" PARTUUID="321b4d22-02"</stdout>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.1.15/testsuite/probe/md3-mockup.xml 
new/libstorage-ng-4.1.22/testsuite/probe/md3-mockup.xml
--- old/libstorage-ng-4.1.15/testsuite/probe/md3-mockup.xml     2018-08-14 
19:01:00.000000000 +0200
+++ new/libstorage-ng-4.1.22/testsuite/probe/md3-mockup.xml     2018-09-02 
14:01:32.000000000 +0200
@@ -15,6 +15,16 @@
       <stdout>md1</stdout>
     </Command>
     <Command>
+      <name>/bin/ls -1l --sort=none '/dev/md'</name>
+      <stdout>total 0</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:31 test2 -> ../md127</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:41 test3 -> ../md126</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:41 test3p1 -> 
../md126p1</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:31 test4 -> 
../md_test4</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:31 test5 -> 
../md_test5</stdout>
+      <stdout>lrwxrwxrwx 1 root root 8 Aug  7 13:31 test5p1 -> 
../md_test5p1</stdout>
+    </Command>
+    <Command>
       <name>/sbin/blkid -c '/dev/null'</name>
       <stdout>/dev/sda1: UUID="2fd6a519-1b93-42dc-bc8f-99ac033a17a9" 
TYPE="ext4" PTTYPE="dos" PARTLABEL="primary" 
PARTUUID="7ec989ba-839c-4991-8a13-b66eab52c828"</stdout>
       <stdout>/dev/sda2: PARTLABEL="primary" 
PARTUUID="2a68a80b-94f7-4770-abf5-058f9660e791"</stdout>


Reply via email to