Hello community,
here is the log from the commit of package libstorage for openSUSE:Factory checked in at 2014-10-08 22:13:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage (Old)
and /work/SRC/openSUSE:Factory/.libstorage.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage/libstorage.changes 2014-10-05 20:31:23.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage.new/libstorage.changes 2014-10-08 22:13:33.000000000 +0200
@@ -1,0 +2,10 @@
+Tue Oct 07 16:53:46 CEST 2014 - aschnell@suse.de
+
+- use xfs_repair instead of extinct xfs_check (bsc#899930)
+
+-------------------------------------------------------------------
+Mon Oct 06 12:51:26 CEST 2014 - aschnell@suse.de
+
+- extended testsuite
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libstorage-2.25.18.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/storage/Container.cc new/libstorage-2.25.18/storage/Container.cc
--- old/libstorage-2.25.18/storage/Container.cc 2014-09-19 11:31:22.000000000 +0200
+++ new/libstorage-2.25.18/storage/Container.cc 2014-10-06 16:30:28.000000000 +0200
@@ -398,8 +398,6 @@
s << " readonly";
if (!c.uby.empty())
s << " usedby:" << c.uby;
- if (!c.alt_names.empty())
- s << " alt_names:" << c.alt_names;
return s;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/storage/Device.cc new/libstorage-2.25.18/storage/Device.cc
--- old/libstorage-2.25.18/storage/Device.cc 2014-03-26 18:08:49.000000000 +0100
+++ new/libstorage-2.25.18/storage/Device.cc 2014-10-06 16:30:28.000000000 +0200
@@ -234,6 +234,8 @@
s << " deleted";
if (d.silent)
s << " silent";
+ if (!d.alt_names.empty())
+ s << " alt_names:" << d.alt_names;
if (!d.userdata.empty())
s << " userdata:" << d.userdata;
return s;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/storage/StorageDefines.h new/libstorage-2.25.18/storage/StorageDefines.h
--- old/libstorage-2.25.18/storage/StorageDefines.h 2014-04-15 12:13:27.000000000 +0200
+++ new/libstorage-2.25.18/storage/StorageDefines.h 2014-10-08 09:30:57.000000000 +0200
@@ -104,7 +104,7 @@
#define FSCKEXT3BIN "/sbin/fsck.ext3"
#define FSCKEXT4BIN "/sbin/fsck.ext4"
#define FSCKJFSBIN "/sbin/fsck.jfs"
-#define FSCKXFSBIN "/usr/sbin/xfs_check"
+#define XFSREPAIRBIN "/usr/sbin/xfs_repair"
#define FSCKREISERBIN "/sbin/reiserfsck"
#define MKSWAPBIN "/sbin/mkswap"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/storage/SystemInfo/CmdBlkid.h new/libstorage-2.25.18/storage/SystemInfo/CmdBlkid.h
--- old/libstorage-2.25.18/storage/SystemInfo/CmdBlkid.h 2014-03-21 17:06:30.000000000 +0100
+++ new/libstorage-2.25.18/storage/SystemInfo/CmdBlkid.h 2014-10-08 09:30:57.000000000 +0200
@@ -20,8 +20,8 @@
*/
-#ifndef BLKID_H
-#define BLKID_H
+#ifndef CMD_BLKID_H
+#define CMD_BLKID_H
#include <string>
#include <map>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/storage/SystemInfo/CmdDasdview.h new/libstorage-2.25.18/storage/SystemInfo/CmdDasdview.h
--- old/libstorage-2.25.18/storage/SystemInfo/CmdDasdview.h 2014-03-21 17:06:30.000000000 +0100
+++ new/libstorage-2.25.18/storage/SystemInfo/CmdDasdview.h 2014-10-08 09:30:57.000000000 +0200
@@ -20,8 +20,8 @@
*/
-#ifndef DASDVIEW_H
-#define DASDVIEW_H
+#ifndef CMD_DASDVIEW_H
+#define CMD_DASDVIEW_H
#include "storage/StorageInterface.h"
#include "storage/Geometry.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/storage/SystemInfo/CmdLsscsi.h new/libstorage-2.25.18/storage/SystemInfo/CmdLsscsi.h
--- old/libstorage-2.25.18/storage/SystemInfo/CmdLsscsi.h 2014-03-21 17:06:30.000000000 +0100
+++ new/libstorage-2.25.18/storage/SystemInfo/CmdLsscsi.h 2014-10-08 09:30:58.000000000 +0200
@@ -20,8 +20,8 @@
*/
-#ifndef LSSCSI_H
-#define LSSCSI_H
+#ifndef CMD_LSSCSI_H
+#define CMD_LSSCSI_H
#include <string>
#include <map>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/storage/SystemInfo/CmdParted.h new/libstorage-2.25.18/storage/SystemInfo/CmdParted.h
--- old/libstorage-2.25.18/storage/SystemInfo/CmdParted.h 2014-09-22 16:59:15.000000000 +0200
+++ new/libstorage-2.25.18/storage/SystemInfo/CmdParted.h 2014-10-08 09:30:58.000000000 +0200
@@ -20,8 +20,8 @@
*/
-#ifndef PARTED_H
-#define PARTED_H
+#ifndef CMD_PARTED_H
+#define CMD_PARTED_H
#include "storage/StorageInterface.h"
#include "storage/Geometry.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/storage/SystemInfo/DevAndSys.h new/libstorage-2.25.18/storage/SystemInfo/DevAndSys.h
--- old/libstorage-2.25.18/storage/SystemInfo/DevAndSys.h 2014-03-21 17:06:30.000000000 +0100
+++ new/libstorage-2.25.18/storage/SystemInfo/DevAndSys.h 2014-10-08 09:30:58.000000000 +0200
@@ -20,8 +20,8 @@
*/
-#ifndef DEV_H
-#define DEV_H
+#ifndef DEV_AND_SYS_H
+#define DEV_AND_SYS_H
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/storage/Volume.cc new/libstorage-2.25.18/storage/Volume.cc
--- old/libstorage-2.25.18/storage/Volume.cc 2014-09-09 12:28:47.000000000 +0200
+++ new/libstorage-2.25.18/storage/Volume.cc 2014-10-08 09:30:58.000000000 +0200
@@ -2173,7 +2173,14 @@
return( ret );
}
-EncryptType Volume::detectEncryption()
+
+ /*
+ * Detect encryption type by trying several encruption types and verifying
+ * that the filesystem specific check tool reports no error and mounting
+ * works.
+ */
+ EncryptType
+ Volume::detectEncryption()
{
EncryptType ret = ENC_UNKNOWN;
EncryptType save_enc = encryption;
@@ -2246,7 +2253,8 @@
cmd = FSCKREISERBIN " --yes --check -q " + quote(use_dev);
break;
case XFS:
- cmd = FSCKXFSBIN " " + quote(use_dev);
+ // xfs_repair is the check tool for xfs
+ cmd = XFSREPAIRBIN " -n " + quote(use_dev);
break;
case JFS:
cmd = FSCKJFSBIN " -n " + quote(use_dev);
@@ -3505,8 +3513,6 @@
{
s << " dtxt:" << v.dtxt;
}
- if (!v.alt_names.empty())
- s << " alt_names:" << v.alt_names;
if( v.encryption != storage::ENC_NONE ||
v.orig_encryption != storage::ENC_NONE )
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/storage/gen_md5sum.cc new/libstorage-2.25.18/storage/gen_md5sum.cc
--- old/libstorage-2.25.18/storage/gen_md5sum.cc 2014-10-02 18:19:59.000000000 +0200
+++ new/libstorage-2.25.18/storage/gen_md5sum.cc 2014-10-08 09:31:46.000000000 +0200
@@ -1,5 +1,5 @@
-#define SOURCES_MD5SUM "e723741977ba0153f4b233ba1db524dd"
-#define SOURCES_MD5_DATE " Thu 2 Oct 18:19:59 CEST 2014 "
+#define SOURCES_MD5SUM "e3023ae080c7f3e6c151d541f7efe0c1"
+#define SOURCES_MD5_DATE " Wed 8 Oct 09:31:46 CEST 2014 "
namespace storage
{
const char* GetSourceMd5() { return SOURCES_MD5SUM; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/Makefile.am new/libstorage-2.25.18/testsuite/Makefile.am
--- old/libstorage-2.25.18/testsuite/Makefile.am 2014-03-13 14:54:46.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/Makefile.am 2014-10-06 16:30:28.000000000 +0200
@@ -12,15 +12,16 @@
LDADD = ../storage/libstorage.la
-noinst_PROGRAMS = backupstate1.single contvolinfo1.single disklabel1.single \
+noinst_PROGRAMS = alt-names1.single alt-names2.single \
+ backupstate1.single contvolinfo1.single disklabel1.single \
format1.single freeinfo1.single fstab1.single fstab2.single \
fstab3.single fstab4.single fstab-add.single fstab-update.single \
fstab-remove.single fstab-ng-add.single fstab-ng-update.single \
fstab-ng-remove.single fstab-ng-find.single crypttab-add.single \
crypttab-remove.single \
humanstring1.single humanstring2.single \
- lvm_create.single lvm_create2.single lvm_extend.single \
- md_create.single partition1.single partitionname.single \
+ lvm-create1.single lvm-create2.single lvm-extend.single \
+ md-create.single partition1.single partitionname.single \
partition-slots1.single \
partitionprefix.single recursive1.single recursive2.single \
recursive3.single renumber1.single renumber2.single renumber3.single \
@@ -31,6 +32,8 @@
mdadm-examine.single parted.single proc-mdstat.single \
proc-mounts.single proc-parts.single vgdisplay.single vgs.single
+alt_names1_single_SOURCES = alt-names1.cc common.h common.cc
+alt_names2_single_SOURCES = alt-names2.cc common.h common.cc
backupstate1_single_SOURCES = backupstate1.cc common.h common.cc
contvolinfo1_single_SOURCES = contvolinfo1.cc common.h common.cc
disklabel1_single_SOURCES = disklabel1.cc common.h common.cc
@@ -51,10 +54,10 @@
crypttab_remove_single_SOURCES = crypttab-remove.cc common.h common.cc
humanstring1_single_SOURCES = humanstring1.cc
humanstring2_single_SOURCES = humanstring2.cc
-lvm_create2_single_SOURCES = lvm_create2.cc common.h common.cc
-lvm_create_single_SOURCES = lvm_create.cc common.h common.cc
-lvm_extend_single_SOURCES = lvm_extend.cc common.h common.cc
-md_create_single_SOURCES = md_create.cc common.h common.cc
+lvm_create1_single_SOURCES = lvm-create1.cc common.h common.cc
+lvm_create2_single_SOURCES = lvm-create2.cc common.h common.cc
+lvm_extend_single_SOURCES = lvm-extend.cc common.h common.cc
+md_create_single_SOURCES = md-create.cc common.h common.cc
partition1_single_SOURCES = partition1.cc common.h common.cc
partitionname_single_SOURCES = partitionname.cc common.cc
partitionprefix_single_SOURCES = partitionprefix.cc common.cc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/Makefile.in new/libstorage-2.25.18/testsuite/Makefile.in
--- old/libstorage-2.25.18/testsuite/Makefile.in 2014-10-02 18:56:02.000000000 +0200
+++ new/libstorage-2.25.18/testsuite/Makefile.in 2014-10-06 16:35:32.000000000 +0200
@@ -82,7 +82,8 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-noinst_PROGRAMS = backupstate1.single$(EXEEXT) \
+noinst_PROGRAMS = alt-names1.single$(EXEEXT) \
+ alt-names2.single$(EXEEXT) backupstate1.single$(EXEEXT) \
contvolinfo1.single$(EXEEXT) disklabel1.single$(EXEEXT) \
format1.single$(EXEEXT) freeinfo1.single$(EXEEXT) \
fstab1.single$(EXEEXT) fstab2.single$(EXEEXT) \
@@ -93,8 +94,8 @@
fstab-ng-remove.single$(EXEEXT) fstab-ng-find.single$(EXEEXT) \
crypttab-add.single$(EXEEXT) crypttab-remove.single$(EXEEXT) \
humanstring1.single$(EXEEXT) humanstring2.single$(EXEEXT) \
- lvm_create.single$(EXEEXT) lvm_create2.single$(EXEEXT) \
- lvm_extend.single$(EXEEXT) md_create.single$(EXEEXT) \
+ lvm-create1.single$(EXEEXT) lvm-create2.single$(EXEEXT) \
+ lvm-extend.single$(EXEEXT) md-create.single$(EXEEXT) \
partition1.single$(EXEEXT) partitionname.single$(EXEEXT) \
partition-slots1.single$(EXEEXT) \
partitionprefix.single$(EXEEXT) recursive1.single$(EXEEXT) \
@@ -123,15 +124,23 @@
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
+am_alt_names1_single_OBJECTS = alt-names1.$(OBJEXT) common.$(OBJEXT)
+alt_names1_single_OBJECTS = $(am_alt_names1_single_OBJECTS)
+alt_names1_single_LDADD = $(LDADD)
+alt_names1_single_DEPENDENCIES = ../storage/libstorage.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_alt_names2_single_OBJECTS = alt-names2.$(OBJEXT) common.$(OBJEXT)
+alt_names2_single_OBJECTS = $(am_alt_names2_single_OBJECTS)
+alt_names2_single_LDADD = $(LDADD)
+alt_names2_single_DEPENDENCIES = ../storage/libstorage.la
am_backupstate1_single_OBJECTS = backupstate1.$(OBJEXT) \
common.$(OBJEXT)
backupstate1_single_OBJECTS = $(am_backupstate1_single_OBJECTS)
backupstate1_single_LDADD = $(LDADD)
backupstate1_single_DEPENDENCIES = ../storage/libstorage.la
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 =
am_blkid_single_OBJECTS = blkid.$(OBJEXT) common.$(OBJEXT)
blkid_single_OBJECTS = $(am_blkid_single_OBJECTS)
blkid_single_LDADD = $(LDADD)
@@ -246,19 +255,19 @@
lsscsi_single_OBJECTS = $(am_lsscsi_single_OBJECTS)
lsscsi_single_LDADD = $(LDADD)
lsscsi_single_DEPENDENCIES = ../storage/libstorage.la
-am_lvm_create_single_OBJECTS = lvm_create.$(OBJEXT) common.$(OBJEXT)
-lvm_create_single_OBJECTS = $(am_lvm_create_single_OBJECTS)
-lvm_create_single_LDADD = $(LDADD)
-lvm_create_single_DEPENDENCIES = ../storage/libstorage.la
-am_lvm_create2_single_OBJECTS = lvm_create2.$(OBJEXT) common.$(OBJEXT)
+am_lvm_create1_single_OBJECTS = lvm-create1.$(OBJEXT) common.$(OBJEXT)
+lvm_create1_single_OBJECTS = $(am_lvm_create1_single_OBJECTS)
+lvm_create1_single_LDADD = $(LDADD)
+lvm_create1_single_DEPENDENCIES = ../storage/libstorage.la
+am_lvm_create2_single_OBJECTS = lvm-create2.$(OBJEXT) common.$(OBJEXT)
lvm_create2_single_OBJECTS = $(am_lvm_create2_single_OBJECTS)
lvm_create2_single_LDADD = $(LDADD)
lvm_create2_single_DEPENDENCIES = ../storage/libstorage.la
-am_lvm_extend_single_OBJECTS = lvm_extend.$(OBJEXT) common.$(OBJEXT)
+am_lvm_extend_single_OBJECTS = lvm-extend.$(OBJEXT) common.$(OBJEXT)
lvm_extend_single_OBJECTS = $(am_lvm_extend_single_OBJECTS)
lvm_extend_single_LDADD = $(LDADD)
lvm_extend_single_DEPENDENCIES = ../storage/libstorage.la
-am_md_create_single_OBJECTS = md_create.$(OBJEXT) common.$(OBJEXT)
+am_md_create_single_OBJECTS = md-create.$(OBJEXT) common.$(OBJEXT)
md_create_single_OBJECTS = $(am_md_create_single_OBJECTS)
md_create_single_LDADD = $(LDADD)
md_create_single_DEPENDENCIES = ../storage/libstorage.la
@@ -412,7 +421,8 @@
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(backupstate1_single_SOURCES) $(blkid_single_SOURCES) \
+SOURCES = $(alt_names1_single_SOURCES) $(alt_names2_single_SOURCES) \
+ $(backupstate1_single_SOURCES) $(blkid_single_SOURCES) \
$(btrfs_single_SOURCES) $(contvolinfo1_single_SOURCES) \
$(cryptsetup_single_SOURCES) $(crypttab_add_single_SOURCES) \
$(crypttab_remove_single_SOURCES) $(dasdview_single_SOURCES) \
@@ -426,7 +436,7 @@
$(fstab1_single_SOURCES) $(fstab2_single_SOURCES) \
$(fstab3_single_SOURCES) $(fstab4_single_SOURCES) \
$(humanstring1_single_SOURCES) $(humanstring2_single_SOURCES) \
- $(lsscsi_single_SOURCES) $(lvm_create_single_SOURCES) \
+ $(lsscsi_single_SOURCES) $(lvm_create1_single_SOURCES) \
$(lvm_create2_single_SOURCES) $(lvm_extend_single_SOURCES) \
$(md_create_single_SOURCES) $(mdadm_detail_single_SOURCES) \
$(mdadm_examine_single_SOURCES) $(parted_single_SOURCES) \
@@ -441,9 +451,11 @@
$(udevencode_single_SOURCES) $(usedby1_single_SOURCES) \
$(userdata1_single_SOURCES) $(uuid1_single_SOURCES) \
$(vgdisplay_single_SOURCES) $(vgs_single_SOURCES)
-DIST_SOURCES = $(backupstate1_single_SOURCES) $(blkid_single_SOURCES) \
- $(btrfs_single_SOURCES) $(contvolinfo1_single_SOURCES) \
- $(cryptsetup_single_SOURCES) $(crypttab_add_single_SOURCES) \
+DIST_SOURCES = $(alt_names1_single_SOURCES) \
+ $(alt_names2_single_SOURCES) $(backupstate1_single_SOURCES) \
+ $(blkid_single_SOURCES) $(btrfs_single_SOURCES) \
+ $(contvolinfo1_single_SOURCES) $(cryptsetup_single_SOURCES) \
+ $(crypttab_add_single_SOURCES) \
$(crypttab_remove_single_SOURCES) $(dasdview_single_SOURCES) \
$(disklabel1_single_SOURCES) $(dmraid_single_SOURCES) \
$(dmsetup_info_single_SOURCES) $(format1_single_SOURCES) \
@@ -455,7 +467,7 @@
$(fstab1_single_SOURCES) $(fstab2_single_SOURCES) \
$(fstab3_single_SOURCES) $(fstab4_single_SOURCES) \
$(humanstring1_single_SOURCES) $(humanstring2_single_SOURCES) \
- $(lsscsi_single_SOURCES) $(lvm_create_single_SOURCES) \
+ $(lsscsi_single_SOURCES) $(lvm_create1_single_SOURCES) \
$(lvm_create2_single_SOURCES) $(lvm_extend_single_SOURCES) \
$(md_create_single_SOURCES) $(mdadm_detail_single_SOURCES) \
$(mdadm_examine_single_SOURCES) $(parted_single_SOURCES) \
@@ -691,6 +703,8 @@
AUTOMAKE_OPTIONS = dejagnu
INCLUDES = -I$(top_srcdir)
LDADD = ../storage/libstorage.la
+alt_names1_single_SOURCES = alt-names1.cc common.h common.cc
+alt_names2_single_SOURCES = alt-names2.cc common.h common.cc
backupstate1_single_SOURCES = backupstate1.cc common.h common.cc
contvolinfo1_single_SOURCES = contvolinfo1.cc common.h common.cc
disklabel1_single_SOURCES = disklabel1.cc common.h common.cc
@@ -711,10 +725,10 @@
crypttab_remove_single_SOURCES = crypttab-remove.cc common.h common.cc
humanstring1_single_SOURCES = humanstring1.cc
humanstring2_single_SOURCES = humanstring2.cc
-lvm_create2_single_SOURCES = lvm_create2.cc common.h common.cc
-lvm_create_single_SOURCES = lvm_create.cc common.h common.cc
-lvm_extend_single_SOURCES = lvm_extend.cc common.h common.cc
-md_create_single_SOURCES = md_create.cc common.h common.cc
+lvm_create1_single_SOURCES = lvm-create1.cc common.h common.cc
+lvm_create2_single_SOURCES = lvm-create2.cc common.h common.cc
+lvm_extend_single_SOURCES = lvm-extend.cc common.h common.cc
+md_create_single_SOURCES = md-create.cc common.h common.cc
partition1_single_SOURCES = partition1.cc common.h common.cc
partitionname_single_SOURCES = partitionname.cc common.cc
partitionprefix_single_SOURCES = partitionprefix.cc common.cc
@@ -789,6 +803,14 @@
echo " rm -f" $$list; \
rm -f $$list
+alt-names1.single$(EXEEXT): $(alt_names1_single_OBJECTS) $(alt_names1_single_DEPENDENCIES) $(EXTRA_alt_names1_single_DEPENDENCIES)
+ @rm -f alt-names1.single$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(alt_names1_single_OBJECTS) $(alt_names1_single_LDADD) $(LIBS)
+
+alt-names2.single$(EXEEXT): $(alt_names2_single_OBJECTS) $(alt_names2_single_DEPENDENCIES) $(EXTRA_alt_names2_single_DEPENDENCIES)
+ @rm -f alt-names2.single$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(alt_names2_single_OBJECTS) $(alt_names2_single_LDADD) $(LIBS)
+
backupstate1.single$(EXEEXT): $(backupstate1_single_OBJECTS) $(backupstate1_single_DEPENDENCIES) $(EXTRA_backupstate1_single_DEPENDENCIES)
@rm -f backupstate1.single$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(backupstate1_single_OBJECTS) $(backupstate1_single_LDADD) $(LIBS)
@@ -897,20 +919,20 @@
@rm -f lsscsi.single$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(lsscsi_single_OBJECTS) $(lsscsi_single_LDADD) $(LIBS)
-lvm_create.single$(EXEEXT): $(lvm_create_single_OBJECTS) $(lvm_create_single_DEPENDENCIES) $(EXTRA_lvm_create_single_DEPENDENCIES)
- @rm -f lvm_create.single$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(lvm_create_single_OBJECTS) $(lvm_create_single_LDADD) $(LIBS)
+lvm-create1.single$(EXEEXT): $(lvm_create1_single_OBJECTS) $(lvm_create1_single_DEPENDENCIES) $(EXTRA_lvm_create1_single_DEPENDENCIES)
+ @rm -f lvm-create1.single$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(lvm_create1_single_OBJECTS) $(lvm_create1_single_LDADD) $(LIBS)
-lvm_create2.single$(EXEEXT): $(lvm_create2_single_OBJECTS) $(lvm_create2_single_DEPENDENCIES) $(EXTRA_lvm_create2_single_DEPENDENCIES)
- @rm -f lvm_create2.single$(EXEEXT)
+lvm-create2.single$(EXEEXT): $(lvm_create2_single_OBJECTS) $(lvm_create2_single_DEPENDENCIES) $(EXTRA_lvm_create2_single_DEPENDENCIES)
+ @rm -f lvm-create2.single$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(lvm_create2_single_OBJECTS) $(lvm_create2_single_LDADD) $(LIBS)
-lvm_extend.single$(EXEEXT): $(lvm_extend_single_OBJECTS) $(lvm_extend_single_DEPENDENCIES) $(EXTRA_lvm_extend_single_DEPENDENCIES)
- @rm -f lvm_extend.single$(EXEEXT)
+lvm-extend.single$(EXEEXT): $(lvm_extend_single_OBJECTS) $(lvm_extend_single_DEPENDENCIES) $(EXTRA_lvm_extend_single_DEPENDENCIES)
+ @rm -f lvm-extend.single$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(lvm_extend_single_OBJECTS) $(lvm_extend_single_LDADD) $(LIBS)
-md_create.single$(EXEEXT): $(md_create_single_OBJECTS) $(md_create_single_DEPENDENCIES) $(EXTRA_md_create_single_DEPENDENCIES)
- @rm -f md_create.single$(EXEEXT)
+md-create.single$(EXEEXT): $(md_create_single_OBJECTS) $(md_create_single_DEPENDENCIES) $(EXTRA_md_create_single_DEPENDENCIES)
+ @rm -f md-create.single$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(md_create_single_OBJECTS) $(md_create_single_LDADD) $(LIBS)
mdadm-detail.single$(EXEEXT): $(mdadm_detail_single_OBJECTS) $(mdadm_detail_single_DEPENDENCIES) $(EXTRA_mdadm_detail_single_DEPENDENCIES)
@@ -1011,6 +1033,8 @@
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alt-names1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alt-names2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backupstate1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blkid.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btrfs.Po@am__quote@
@@ -1039,10 +1063,10 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/humanstring1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/humanstring2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsscsi.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lvm_create.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lvm_create2.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lvm_extend.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md_create.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lvm-create1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lvm-create2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lvm-extend.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md-create.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mdadm-detail.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mdadm-examine.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parted.Po@am__quote@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/alt-names1.cc new/libstorage-2.25.18/testsuite/alt-names1.cc
--- old/libstorage-2.25.18/testsuite/alt-names1.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/alt-names1.cc 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,65 @@
+
+#include <iostream>
+
+#include "common.h"
+
+
+using namespace storage;
+using namespace std;
+
+
+void
+test(StorageInterface* s, const string& device)
+{
+ VolumeInfo info;
+ cout << s->getVolume(device, info) << " " << device << " " << endl;
+}
+
+
+void
+altNamesPartition()
+{
+ cout << "altNamesPartition" << endl;
+
+ setup_system("thalassa");
+
+ StorageInterface* s = createStorageInterface(TestEnvironment());
+
+ test(s, "/dev/sda1");
+ // test(s, "/dev/disk/by-label/BOOT"); // FIXME
+
+ delete s;
+}
+
+
+
+void
+altNamesLogicalVolume()
+{
+ cout << "altNamesLogicalVolume" << endl;
+
+ setup_system("thalassa");
+
+ StorageInterface* s = createStorageInterface(TestEnvironment());
+
+ test(s, "/dev/system/abuild");
+ // test(s, "/dev/mapper/system-abuild"); // FIXME
+ // test(s, "/dev/dm-0"); // FIXME
+ // test(s, "/dev/disk/by-id/dm-name-system-abuild"); // FIXME
+ // test(s, "/dev/disk/by-label/ABUILD"); // FIXME
+
+ delete s;
+}
+
+
+int
+main()
+{
+ setup_logger();
+
+ altNamesPartition();
+
+ cout << endl;
+
+ altNamesLogicalVolume();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/alt-names2.cc new/libstorage-2.25.18/testsuite/alt-names2.cc
--- old/libstorage-2.25.18/testsuite/alt-names2.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/alt-names2.cc 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,86 @@
+
+#include <iostream>
+
+#include "common.h"
+
+
+using namespace storage;
+using namespace std;
+
+
+void
+test(StorageInterface* s, const string& device)
+{
+ VolumeInfo info;
+ cout << s->getVolume(device, info) << " " << device << " " << endl;
+}
+
+
+void
+altNamesPartition()
+{
+ cout << "altNamesPartition" << endl;
+
+ setup_system("thalassa");
+
+ StorageInterface* s = createStorageInterface(TestEnvironment());
+
+ cout << s->destroyPartitionTable("/dev/sdc", "msdos") << endl;
+
+ string device;
+ cout << s->createPartitionKb("/dev/sdc", PRIMARY, RegionInfo(0, 1024*1024), device) << endl;
+ cout << device << endl;
+
+ // set label
+ cout << s->changeFormatVolume(device, true, EXT4) << endl;
+ cout << s->changeLabelVolume(device, "test-label") << endl;
+
+ test(s, "/dev/sdc1");
+ // test(s, "/dev/disk/by-label/test-label"); // FIXME
+
+ delete s;
+}
+
+
+
+void
+altNamesLogicalVolume()
+{
+ cout << "altNamesLogicalVolume" << endl;
+
+ setup_system("thalassa");
+
+ StorageInterface* s = createStorageInterface(TestEnvironment());
+
+ // create volume group
+ cout << s->createLvmVg("test-vg", 4, false, { "/dev/sdc1" }) << endl;
+
+ // create logical volume
+ string device;
+ cout << s->createLvmLv("test-vg", "test-lv", 1024*1024, 1, device) << endl;
+ cout << device << endl;
+
+ // set label
+ cout << s->changeFormatVolume(device, true, EXT4) << endl;
+ cout << s->changeLabelVolume(device, "test-label") << endl;
+
+ test(s, "/dev/test-vg/test-lv");
+ test(s, "/dev/mapper/test--vg-test--lv");
+ // test(s, "/dev/disk/by-id/dm-name-test--vg-test--lv"); // FIXME
+ // test(s, "/dev/disk/by-label/test-label"); // FIXME
+
+ delete s;
+}
+
+
+int
+main()
+{
+ setup_logger();
+
+ altNamesPartition();
+
+ cout << endl;
+
+ altNamesLogicalVolume();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/common.cc new/libstorage-2.25.18/testsuite/common.cc
--- old/libstorage-2.25.18/testsuite/common.cc 2014-10-02 18:18:54.000000000 +0200
+++ new/libstorage-2.25.18/testsuite/common.cc 2014-10-06 16:30:28.000000000 +0200
@@ -47,8 +47,8 @@
{
ofstream fstab("tmp/etc/fstab");
- for (list<string>::const_iterator it = lines.begin(); it != lines.end(); ++it)
- fstab << *it << endl;
+ for (const string& line : lines)
+ fstab << line << endl;
}
@@ -57,8 +57,8 @@
{
ofstream fstab("tmp/etc/crypttab");
- for (list<string>::const_iterator it = lines.begin(); it != lines.end(); ++it)
- fstab << *it << endl;
+ for (const string& line : lines)
+ fstab << line << endl;
}
@@ -93,19 +93,18 @@
{
deque<PartitionInfo> partitioninfos;
s->getPartitionInfo(disk, partitioninfos);
- for (deque<PartitionInfo>::iterator it = partitioninfos.begin();
- it != partitioninfos.end(); ++it)
+ for (const PartitionInfo& partitioninfo : partitioninfos)
{
- cout << it->v.name << ' ';
- switch (it->partitionType)
+ cout << partitioninfo.v.name << ' ';
+ switch (partitioninfo.partitionType)
{
case PRIMARY: cout << "PRIMARY "; break;
case EXTENDED: cout << "EXTENDED "; break;
case LOGICAL: cout << "LOGICAL "; break;
case PTYPE_ANY: cout << "ANY "; break;
}
- cout << Region(it->cylRegion) << ' ';
- switch (it->v.fs)
+ cout << Region(partitioninfo.cylRegion) << ' ';
+ switch (partitioninfo.v.fs)
{
case FSUNKNOWN: cout << "UNKNOWN"; break;
case REISERFS: cout << "REISERFS"; break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/lvm-create1.cc new/libstorage-2.25.18/testsuite/lvm-create1.cc
--- old/libstorage-2.25.18/testsuite/lvm-create1.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/lvm-create1.cc 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,82 @@
+
+#include <iostream>
+#include <sstream>
+
+#include "common.h"
+
+
+using namespace storage;
+using namespace std;
+
+
+void createLvs(const string& vg, int n, const deque<string>& pvs)
+{
+ cout << "createLvs" << endl;
+
+ StorageInterface* s = createStorageInterface(TestEnvironment());
+
+ /* create volume group with the above pvs */
+ cout << s->createLvmVg( vg, 4, false, pvs ) << endl;
+
+ /* create n logical volumes */
+ int ret = 0;
+ for (int i = 0; i < n; ++i)
+ {
+ ostringstream name;
+ name << "volume" << i;
+
+ string dev;
+ ret = s->createLvmLv( vg, name.str(), 100, 1, dev );
+ }
+ cout << ret << endl;
+
+ deque<LvmLvInfo> plist;
+ s->getLvmLvInfo( vg, plist );
+ cout << plist.size() << endl;
+
+ delete s;
+}
+
+
+void createExtendedLv(const string& vg, const string& dev)
+{
+ cout << "createExtendedLv" << endl;
+
+ StorageInterface* s = createStorageInterface(TestEnvironment());
+
+ deque<string> devs;
+ devs.push_back(dev); // add extended partition
+
+ /* create volume group with the extended partition */
+ cout << s->createLvmVg( vg, 4, false, devs ) << endl; // FAILS
+
+ delete s;
+}
+
+
+int
+main()
+{
+ setup_logger();
+
+ /*
+ * Check that we can create a volume group from primary and logical
+ * partitons and 50 logical volumes.
+ */
+ setup_system("thalassa");
+
+ deque<string> pvs;
+ pvs.push_back("/dev/sdc1");
+ pvs.push_back("/dev/sdc2");
+ pvs.push_back("/dev/sdc5");
+ pvs.push_back("/dev/sdc6");
+ createLvs("test", 50, pvs);
+
+ /*
+ * Check that we cannot create a volume group out of an extended
+ * partition.
+ */
+ setup_system("thalassa");
+
+ createExtendedLv("test", "/dev/sdc4");
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/lvm-create2.cc new/libstorage-2.25.18/testsuite/lvm-create2.cc
--- old/libstorage-2.25.18/testsuite/lvm-create2.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/lvm-create2.cc 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,40 @@
+
+#include <iostream>
+
+#include "common.h"
+
+
+using namespace storage;
+using namespace std;
+
+
+int
+main()
+{
+ setup_logger();
+
+ setup_system("thalassa");
+
+ StorageInterface* s = createStorageInterface(TestEnvironment());
+
+ string device;
+ deque<string> devices;
+
+ /* create volume group "system" which does already exist */
+ devices.clear();
+ devices.push_back("/dev/sdb1");
+ cout << s->createLvmVg("system", 4, false, devices) << endl; // FAILS
+
+ /* create volume group "data" */
+ devices.clear();
+ devices.push_back("/dev/sdb1");
+ cout << s->createLvmVg("data", 4, false, devices) << endl;
+
+ /* create logical volume "swap" on "system" which does already exist */
+ cout << s->createLvmLv("system", "swap", 2000, 1, device) << endl; // FAILS
+
+ /* create logical volume "swap" on "data" */
+ cout << s->createLvmLv("data", "swap", 2000, 1, device) << endl;
+
+ delete s;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/lvm-extend.cc new/libstorage-2.25.18/testsuite/lvm-extend.cc
--- old/libstorage-2.25.18/testsuite/lvm-extend.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/lvm-extend.cc 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,48 @@
+
+#include <iostream>
+#include
+
+#include "common.h"
+
+
+using namespace storage;
+using namespace std;
+
+
+void
+extendVg(const string& vg, const deque<string>& pvs)
+{
+ cout << "extendVg" << endl;
+
+ StorageInterface* s = createStorageInterface(TestEnvironment());
+
+ LvmVgInfo info;
+ cout << s->getLvmVgInfo(vg, info) << endl;
+ cout << boost::join(info.devices, " ") << endl;
+
+ /* extend it by devs_extend given pvs */
+ cout << s->extendLvmVg(vg, pvs) << endl;
+
+ cout << s->getLvmVgInfo(vg, info) << endl;
+ cout << boost::join(info.devices, " ") << endl;
+ cout << boost::join(info.devices_add, " ") << endl;
+
+ delete s;
+}
+
+
+int
+main()
+{
+ setup_logger();
+
+ setup_system("thalassa");
+
+ deque<string> devs;
+
+ /*
+ * Check that we can extend a volume group.
+ */
+ devs.push_back("/dev/sdb1");
+ extendVg("system", devs);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/lvm_create.cc new/libstorage-2.25.18/testsuite/lvm_create.cc
--- old/libstorage-2.25.18/testsuite/lvm_create.cc 2014-01-22 10:39:57.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/lvm_create.cc 1970-01-01 01:00:00.000000000 +0100
@@ -1,83 +0,0 @@
-
-#include <iostream>
-#include <sstream>
-
-#include "common.h"
-
-
-using namespace storage;
-using namespace std;
-
-
-void createLvs(const string& vg, int n, const deque<string>& pvs)
-{
- cout << "createLvs" << endl;
-
- StorageInterface* s = createStorageInterface(TestEnvironment());
-
- /* create volume group with the above pvs */
- cout << s->createLvmVg( vg, 4, false, pvs ) << endl;
-
- /* create n logical volumes */
- int ret = 0;
- for ( int i = 0; i < n; i++ )
- {
- ostringstream name;
- name << "volume";
- name << i;
-
- string dev;
- ret = s->createLvmLv( vg, name.str(), 100, 1, dev );
- }
- cout << ret << endl;
-
- deque<LvmLvInfo> plist;
- s->getLvmLvInfo( vg, plist );
- cout << plist.size() << endl;
-
- delete s;
-}
-
-
-void createExtendedLv(const string& vg, const string& dev)
-{
- cout << "createExtendedLv" << endl;
-
- StorageInterface* s = createStorageInterface(TestEnvironment());
-
- deque<string> devs;
- devs.push_back(dev); // add extended partition
-
- /* create volume group with the extended partition */
- cout << s->createLvmVg( vg, 4, false, devs ) << endl; // FAILS
-
- delete s;
-}
-
-
-int
-main()
-{
- setup_logger();
-
- /*
- * Check that we can create a volume group from primary and logical
- * partitons and 50 logical volumes.
- */
- setup_system("thalassa");
-
- deque<string> pvs;
- pvs.push_back("/dev/sdc1");
- pvs.push_back("/dev/sdc2");
- pvs.push_back("/dev/sdc5");
- pvs.push_back("/dev/sdc6");
- createLvs("test", 50, pvs);
-
- /*
- * Check that we cannot create a volume group out of an extended
- * partition.
- */
- setup_system("thalassa");
-
- createExtendedLv("test", "/dev/sdc4");
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/lvm_create2.cc new/libstorage-2.25.18/testsuite/lvm_create2.cc
--- old/libstorage-2.25.18/testsuite/lvm_create2.cc 2014-01-22 10:39:57.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/lvm_create2.cc 1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-
-#include <iostream>
-
-#include "common.h"
-
-
-using namespace storage;
-using namespace std;
-
-
-int
-main()
-{
- setup_logger();
-
- setup_system("thalassa");
-
- StorageInterface* s = createStorageInterface(TestEnvironment());
-
- string device;
- deque<string> devices;
-
- /* create volume group "system" which does already exist */
- devices.clear();
- devices.push_back("/dev/sdb1");
- cout << s->createLvmVg("system", 4, false, devices) << endl; // FAILS
-
- /* create volume group "data" */
- devices.clear();
- devices.push_back("/dev/sdb1");
- cout << s->createLvmVg("data", 4, false, devices) << endl;
-
- /* create logical volume "swap" on "system" which does already exist */
- cout << s->createLvmLv("system", "swap", 2000, 1, device) << endl; // FAILS
-
- /* create logical volume "swap" on "data" */
- cout << s->createLvmLv("data", "swap", 2000, 1, device) << endl;
-
- delete s;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/lvm_extend.cc new/libstorage-2.25.18/testsuite/lvm_extend.cc
--- old/libstorage-2.25.18/testsuite/lvm_extend.cc 2014-01-22 10:39:57.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/lvm_extend.cc 1970-01-01 01:00:00.000000000 +0100
@@ -1,48 +0,0 @@
-
-#include <iostream>
-#include
-
-#include "common.h"
-
-
-using namespace storage;
-using namespace std;
-
-
-void
-extendVg(const string& vg, const deque<string>& pvs)
-{
- cout << "extendVg" << endl;
-
- StorageInterface* s = createStorageInterface(TestEnvironment());
-
- LvmVgInfo info;
- cout << s->getLvmVgInfo(vg, info) << endl;
- cout << boost::join(info.devices, " ") << endl;
-
- /* extend it by devs_extend given pvs */
- cout << s->extendLvmVg(vg, pvs) << endl;
-
- cout << s->getLvmVgInfo(vg, info) << endl;
- cout << boost::join(info.devices, " ") << endl;
- cout << boost::join(info.devices_add, " ") << endl;
-
- delete s;
-}
-
-
-int
-main()
-{
- setup_logger();
-
- setup_system("thalassa");
-
- deque<string> devs;
-
- /*
- * Check that we can extend a volume group.
- */
- devs.push_back("/dev/sdb1");
- extendVg("system", devs);
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/md-create.cc new/libstorage-2.25.18/testsuite/md-create.cc
--- old/libstorage-2.25.18/testsuite/md-create.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/md-create.cc 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,111 @@
+
+#include
+#include <iostream>
+
+#include "common.h"
+
+
+using namespace storage;
+using namespace std;
+
+
+StorageInterface *s = 0;
+
+
+void
+print_md_info()
+{
+ deque<MdInfo> plist;
+
+ s->getMdInfo(plist);
+
+ for (const MdInfo& p : plist)
+ {
+ cout << ' ' << p.v.name << ' ' << p.v.device << ' ' << p.nr
+ << ' ' << p.type << ' ' << p.chunkSizeK << ' ' << p.v.sizeK;
+ }
+}
+
+
+void
+createMD(MdType type, list<string> devs)
+{
+ s = createStorageInterface(TestEnvironment());
+
+ int ret = s->createMd("/dev/md0", type, devs, list<string>());
+ if (ret == 0)
+ ret = s->checkMd("/dev/md0");
+
+ cout << "createMD: " << ret;
+ if (ret == 0)
+ print_md_info();
+ cout << endl;
+
+ delete s;
+}
+
+
+int
+main()
+{
+ setup_logger();
+
+ setup_system("thalassa");
+
+ list<string> devs;
+
+ /*
+ * Check that we _cannot_ create software raid devices with just one
+ * partition
+ */
+ devs.push_back("/dev/sdc1");
+ cout << "Devices: " << devs.size() << " ----------------------\n";
+ createMD(RAID0, devs); // fails, too few devices
+ createMD(RAID1, devs); // fails, too few devices
+ createMD(RAID5, devs); // fails, too few devices
+ createMD(RAID6, devs); // fails, too few devices
+ createMD(RAID10, devs); // fails, too few devices
+ createMD(MULTIPATH, devs); // fails, too few devices
+ createMD(RAID_UNK, devs); // RAID_UNK always fails
+
+ /*
+ * Check that this works for some raid levels with two devices
+ */
+ devs.push_back("/dev/sdc2");
+ cout << "Devices: " << devs.size() << " ----------------------\n";
+ createMD(RAID0, devs); // works now
+ createMD(RAID1, devs); // works now
+ createMD(RAID5, devs); // fails, too few devices
+ createMD(RAID6, devs); // fails, too few devices
+ createMD(RAID10, devs); // works now
+ createMD(MULTIPATH, devs); // works now
+ createMD(RAID_UNK, devs); // RAID_UNK always fails
+
+ /*
+ * RAID6 still fails
+ */
+ devs.push_back("/dev/sdc3");
+ cout << "Devices: " << devs.size() << " ----------------------\n";
+ createMD(RAID5, devs); // works now
+ createMD(RAID6, devs); // fails, too few devices
+
+ /*
+ * Everything works now
+ */
+ devs.push_back("/dev/sdc5");
+ cout << "Devices: " << devs.size() << " ----------------------\n";
+ createMD(RAID6, devs); // works now
+
+ /*
+ * Check that we can create a software raid device with partitions
+ * from different devices
+ */
+ devs.push_back("/dev/sdb1");
+ cout << "Devices: " << devs.size() << " ----------------------\n";
+ createMD(RAID0, devs);
+ createMD(RAID1, devs);
+ createMD(RAID5, devs);
+ createMD(RAID6, devs);
+ createMD(RAID10, devs);
+ createMD(MULTIPATH, devs);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/md_create.cc new/libstorage-2.25.18/testsuite/md_create.cc
--- old/libstorage-2.25.18/testsuite/md_create.cc 2014-07-07 18:23:18.000000000 +0200
+++ new/libstorage-2.25.18/testsuite/md_create.cc 1970-01-01 01:00:00.000000000 +0100
@@ -1,111 +0,0 @@
-
-#include
-#include <iostream>
-
-#include "common.h"
-
-
-using namespace storage;
-using namespace std;
-
-
-StorageInterface *s = 0;
-
-
-void
-print_md_info()
-{
- deque<MdInfo> plist;
-
- s->getMdInfo(plist);
-
- for (const MdInfo& p : plist)
- {
- cout << ' ' << p.v.name << ' ' << p.v.device << ' ' << p.nr
- << ' ' << p.type << ' ' << p.chunkSizeK << ' ' << p.v.sizeK;
- }
-}
-
-
-void
-createMD(MdType type, list<string> devs)
-{
- s = createStorageInterface(TestEnvironment());
-
- int ret = s->createMd("/dev/md0", type, devs, list<string>());
- if (ret == 0)
- ret = s->checkMd("/dev/md0");
-
- cout << "createMD: " << ret;
- if (ret == 0)
- print_md_info();
- cout << endl;
-
- delete s;
-}
-
-
-int
-main()
-{
- setup_logger();
-
- setup_system("thalassa");
-
- list<string> devs;
-
- /*
- * Check that we _cannot_ create software raid devices with just one
- * partition
- */
- devs.push_back("/dev/sdc1");
- cout << "Devices: " << devs.size() << " ----------------------\n";
- createMD(RAID0, devs); // fails, too few devices
- createMD(RAID1, devs); // fails, too few devices
- createMD(RAID5, devs); // fails, too few devices
- createMD(RAID6, devs); // fails, too few devices
- createMD(RAID10, devs); // fails, too few devices
- createMD(MULTIPATH, devs); // fails, too few devices
- createMD(RAID_UNK, devs); // RAID_UNK always fails
-
- /*
- * Check that this works for some raid levels with two devices
- */
- devs.push_back("/dev/sdc2");
- cout << "Devices: " << devs.size() << " ----------------------\n";
- createMD(RAID0, devs); // works now
- createMD(RAID1, devs); // works now
- createMD(RAID5, devs); // fails, too few devices
- createMD(RAID6, devs); // fails, too few devices
- createMD(RAID10, devs); // works now
- createMD(MULTIPATH, devs); // works now
- createMD(RAID_UNK, devs); // RAID_UNK always fails
-
- /*
- * RAID6 still fails
- */
- devs.push_back("/dev/sdc3");
- cout << "Devices: " << devs.size() << " ----------------------\n";
- createMD(RAID5, devs); // works now
- createMD(RAID6, devs); // fails, too few devices
-
- /*
- * Everything works now
- */
- devs.push_back("/dev/sdc5");
- cout << "Devices: " << devs.size() << " ----------------------\n";
- createMD(RAID6, devs); // works now
-
- /*
- * Check that we can create a software raid device with partitions
- * from different devices
- */
- devs.push_back("/dev/sdb1");
- cout << "Devices: " << devs.size() << " ----------------------\n";
- createMD(RAID0, devs);
- createMD(RAID1, devs);
- createMD(RAID5, devs);
- createMD(RAID6, devs);
- createMD(RAID10, devs);
- createMD(MULTIPATH, devs);
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/single.out/alt-names1.out new/libstorage-2.25.18/testsuite/single.out/alt-names1.out
--- old/libstorage-2.25.18/testsuite/single.out/alt-names1.out 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/single.out/alt-names1.out 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,5 @@
+altNamesPartition
+0 /dev/sda1
+
+altNamesLogicalVolume
+0 /dev/system/abuild
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/single.out/alt-names2.out new/libstorage-2.25.18/testsuite/single.out/alt-names2.out
--- old/libstorage-2.25.18/testsuite/single.out/alt-names2.out 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/single.out/alt-names2.out 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,16 @@
+altNamesPartition
+0
+0
+/dev/sdc1
+0
+0
+0 /dev/sdc1
+
+altNamesLogicalVolume
+0
+0
+/dev/test-vg/test-lv
+0
+0
+0 /dev/test-vg/test-lv
+0 /dev/mapper/test--vg-test--lv
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/single.out/lvm-create1.out new/libstorage-2.25.18/testsuite/single.out/lvm-create1.out
--- old/libstorage-2.25.18/testsuite/single.out/lvm-create1.out 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/single.out/lvm-create1.out 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,6 @@
+createLvs
+0
+0
+50
+createExtendedLv
+-4003
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/single.out/lvm-create2.out new/libstorage-2.25.18/testsuite/single.out/lvm-create2.out
--- old/libstorage-2.25.18/testsuite/single.out/lvm-create2.out 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/single.out/lvm-create2.out 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,4 @@
+-2006
+0
+-4006
+0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/single.out/lvm-extend.out new/libstorage-2.25.18/testsuite/single.out/lvm-extend.out
--- old/libstorage-2.25.18/testsuite/single.out/lvm-extend.out 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/single.out/lvm-extend.out 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,7 @@
+extendVg
+0
+/dev/sda2
+0
+0
+/dev/sda2
+/dev/sdb1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/single.out/lvm_create.out new/libstorage-2.25.18/testsuite/single.out/lvm_create.out
--- old/libstorage-2.25.18/testsuite/single.out/lvm_create.out 2014-01-22 10:39:57.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/single.out/lvm_create.out 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-createLvs
-0
-0
-50
-createExtendedLv
--4003
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/single.out/lvm_create2.out new/libstorage-2.25.18/testsuite/single.out/lvm_create2.out
--- old/libstorage-2.25.18/testsuite/single.out/lvm_create2.out 2014-01-22 10:39:57.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/single.out/lvm_create2.out 1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
--2006
-0
--4006
-0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/single.out/lvm_extend.out new/libstorage-2.25.18/testsuite/single.out/lvm_extend.out
--- old/libstorage-2.25.18/testsuite/single.out/lvm_extend.out 2014-01-22 10:39:57.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/single.out/lvm_extend.out 1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-extendVg
-0
-/dev/sda2
-0
-0
-/dev/sda2
-/dev/sdb1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/single.out/md-create.out new/libstorage-2.25.18/testsuite/single.out/md-create.out
--- old/libstorage-2.25.18/testsuite/single.out/md-create.out 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-2.25.18/testsuite/single.out/md-create.out 2014-10-06 16:30:28.000000000 +0200
@@ -0,0 +1,28 @@
+Devices: 1 ----------------------
+createMD: -6002
+createMD: -6002
+createMD: -6002
+createMD: -6002
+createMD: -6002
+createMD: -6002
+createMD: -6018
+Devices: 2 ----------------------
+createMD: 0 md0 /dev/md0 0 1 0 15735635
+createMD: 0 md0 /dev/md0 0 2 0 5253223
+createMD: -6002
+createMD: -6002
+createMD: 0 md0 /dev/md0 0 5 0 5253223
+createMD: 0 md0 /dev/md0 0 6 0 5253223
+createMD: -6018
+Devices: 3 ----------------------
+createMD: 0 md0 /dev/md0 0 3 0 10506446
+createMD: -6002
+Devices: 4 ----------------------
+createMD: 0 md0 /dev/md0 0 4 0 10506446
+Devices: 5 ----------------------
+createMD: 0 md0 /dev/md0 0 1 0 57689319
+createMD: 0 md0 /dev/md0 0 2 0 5253223
+createMD: 0 md0 /dev/md0 0 3 0 21012892
+createMD: 0 md0 /dev/md0 0 4 0 15759669
+createMD: 0 md0 /dev/md0 0 5 0 13133057
+createMD: 0 md0 /dev/md0 0 6 0 5253223
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.25.18/testsuite/single.out/md_create.out new/libstorage-2.25.18/testsuite/single.out/md_create.out
--- old/libstorage-2.25.18/testsuite/single.out/md_create.out 2014-07-07 18:23:18.000000000 +0200
+++ new/libstorage-2.25.18/testsuite/single.out/md_create.out 1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-Devices: 1 ----------------------
-createMD: -6002
-createMD: -6002
-createMD: -6002
-createMD: -6002
-createMD: -6002
-createMD: -6002
-createMD: -6018
-Devices: 2 ----------------------
-createMD: 0 md0 /dev/md0 0 1 0 15735635
-createMD: 0 md0 /dev/md0 0 2 0 5253223
-createMD: -6002
-createMD: -6002
-createMD: 0 md0 /dev/md0 0 5 0 5253223
-createMD: 0 md0 /dev/md0 0 6 0 5253223
-createMD: -6018
-Devices: 3 ----------------------
-createMD: 0 md0 /dev/md0 0 3 0 10506446
-createMD: -6002
-Devices: 4 ----------------------
-createMD: 0 md0 /dev/md0 0 4 0 10506446
-Devices: 5 ----------------------
-createMD: 0 md0 /dev/md0 0 1 0 57689319
-createMD: 0 md0 /dev/md0 0 2 0 5253223
-createMD: 0 md0 /dev/md0 0 3 0 21012892
-createMD: 0 md0 /dev/md0 0 4 0 15759669
-createMD: 0 md0 /dev/md0 0 5 0 13133057
-createMD: 0 md0 /dev/md0 0 6 0 5253223
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org