Bug 1072897 - [ PATCH ] - Enable tests in %check
Summary: [ PATCH ] - Enable tests in %check
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: mulhern
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1078300
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-05 10:57 UTC by Alexander Todorov
Modified: 2015-06-19 17:05 UTC (History)
5 users (show)

Fixed In Version: python-blivet-1.7-1
Clone Of:
Environment:
Last Closed: 2015-06-19 17:05:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
PATCH (692 bytes, patch)
2014-03-05 10:57 UTC, Alexander Todorov
no flags Details | Diff
adds a little debugging output (2.54 KB, patch)
2015-01-27 21:29 UTC, mulhern
no flags Details | Diff
blivet.log (4.17 KB, text/plain)
2015-01-29 10:03 UTC, Alexander Todorov
no flags Details
blivet.log (364.38 KB, text/plain)
2015-01-30 13:38 UTC, Alexander Todorov
no flags Details

Description Alexander Todorov 2014-03-05 10:57:36 UTC
Created attachment 870906 [details]
PATCH

Description of problem:
The attached patch enables test execution in %check but adds a few BuildRequires. Works well as non-root user but skips some of the tests though.


Version-Release number of selected component (if applicable):
python-blivet-0.43-1.fc21.src.rpm

Comment 1 Alexander Todorov 2015-01-12 13:38:02 UTC
Hi David,
is this something we can do or the test require root access/disk access ? Do you expect to see lots of failures if the test suite is executed in the limited environment of Koji buildroot ?

Comment 2 mulhern 2015-01-22 13:50:35 UTC
I would expect to see a fairly high number of skips. But I am not familiar with Koji buildroot...so it is hard to predict. Is there any way you can apply the patch and see what happens?

Comment 3 Alexander Todorov 2015-01-23 14:00:58 UTC
here's what happens if I try executing the test suite as non-root user

+ make test
*** Running unittests ***
PYTHONPATH=.:tests/ python -m unittest discover -v -s tests/ -p '*_test.py'
dm.c: 1693: not running as root returning empty list
testActionApplyCancel (action_test.DeviceActionTestCase) ... ERROR
testActionCreation (action_test.DeviceActionTestCase)
Verify correct operation of action class constructors. ... ERROR
testActionDependencies (action_test.DeviceActionTestCase)
Verify correct functioning of action dependencies. ... ERROR
testActionObsoletes (action_test.DeviceActionTestCase)
Verify correct operation of DeviceAction.obsoletes. ... ERROR
testActionPruning (action_test.DeviceActionTestCase)
Verify correct functioning of action pruning. ... ERROR
testActionRegistration (action_test.DeviceActionTestCase)
Verify correct operation of action registration and cancelling. ... ERROR
testActionSorting (action_test.DeviceActionTestCase)
Verify correct functioning of action sorting. ... ERROR
testActions (action_test.DeviceActionTestCase)
Verify correct management of actions. ... ERROR
testContainerActions (action_test.DeviceActionTestCase) ... ERROR
testInitializeDisk (clearpart_test.ClearPartTestCase) ... ok
testRecursiveRemove (clearpart_test.ClearPartTestCase) ... ok
testShouldClear (clearpart_test.ClearPartTestCase)
Test the Blivet.shouldClear method. ... ERROR
testMDFactory (devicefactory_test.MDFactoryTestCase) ... ERROR
testMkfsDefaults (devicelibs_test.btrfs_test.BTRFSAsRootTestCase1) ... skipped 'requires root privileges'
testUnmountedBTRFS (devicelibs_test.btrfs_test.BTRFSAsRootTestCase1)
A series of simple tests on an unmounted file system. ... skipped 'requires root privileges'
testSubvolume (devicelibs_test.btrfs_test.BTRFSAsRootTestCase2)
Tests which focus on subvolumes. ... skipped 'requires root privileges'
testSmallDevice (devicelibs_test.btrfs_test.BTRFSAsRootTestCase3)
Creation of a smallish device will result in an error if the ... skipped 'requires root privileges'
testCryptoMisc (devicelibs_test.crypto_test.CryptoTestCase) ... skipped 'requires root privileges'
testCryptoOpen (devicelibs_test.crypto_test.CryptoTestCase2) ... skipped 'requires root privileges'
testPassphrase (devicelibs_test.crypto_test.CryptoTestCase3) ... ok
testSanitize (devicelibs_test.dasd_test.SanitizeTest) ... ok
test_bad_device_path (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_bad_host_bus (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_biosdev_to_edd_dir (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_collect_edd_data (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_collect_edd_data_cciss (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_edd_entry_str (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_get_edd_dict_1 (devicelibs_test.edd_test.EddTestCase)
Test get_edd_dict()'s pci_dev matching. ... skipped 'not implemented'
test_get_edd_dict_2 (devicelibs_test.edd_test.EddTestCase)
Test get_edd_dict()'s pci_dev matching. ... skipped 'not implemented'
test_get_edd_dict_3 (devicelibs_test.edd_test.EddTestCase)
Test scenario when the 0x80 and 0x81 edd directories contain the ... skipped 'not implemented'
test_matcher_device_path (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
testLVM (devicelibs_test.lvm_test.LVMAsRootTestCase) ... skipped 'requires root privileges'
testClampSize (devicelibs_test.lvm_test.LVMTestCase) ... ok
testGetPossiblePhysicalExtents (devicelibs_test.lvm_test.LVMTestCase) ... ok
test_backup_disabled (devicelibs_test.lvm_test.LVM_Metadata_Backup_TestCase) ... skipped 'requires root privileges'
test_backup_enabled (devicelibs_test.lvm_test.LVM_Metadata_Backup_TestCase) ... skipped 'requires root privileges'
testMDDetail (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase) ... skipped 'requires root privileges'
testMDDetail0_90 (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase) ... skipped 'requires root privileges'
testMDDetailContainerDefault (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase) ... skipped 'requires root privileges'
testMDDetailMDDevice (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase) ... skipped 'requires root privileges'
testMDDetailSpares (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase) ... skipped 'requires root privileges'
testMDExamine0 (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... skipped 'requires root privileges'
testMDExamine0_90 (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... skipped 'requires root privileges'
testMDExamine1 (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... skipped 'requires root privileges'
testMDExamine1_2 (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... skipped 'requires root privileges'
testMDExamineContainerDefault (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... skipped 'requires root privileges'
testMDExamineDefault (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... skipped 'requires root privileges'
testMDExamineMDRaidArray (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... skipped 'requires root privileges'
testMDExamineNonMDRaid (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... skipped 'requires root privileges'
testMDExamineSpares (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... skipped 'requires root privileges'
testMDRaid (devicelibs_test.mdraid_test.MDRaidTestCase) ... ok
testMisc (devicelibs_test.mdraid_test.MDRaidTestCase)
Miscellaneous testing. ... ok
testGrow (devicelibs_test.mdraid_test.RAID0Test) ... skipped 'requires root privileges'
testGrowRAID1 (devicelibs_test.mdraid_test.RAID0Test) ... skipped 'requires root privileges'
testGrowSimple (devicelibs_test.mdraid_test.RAID0Test) ... skipped 'requires root privileges'
testGrowSmaller (devicelibs_test.mdraid_test.RAID0Test) ... skipped 'requires root privileges'
testGrowTooBig (devicelibs_test.mdraid_test.RAID0Test) ... skipped 'requires root privileges'
testMDRaidAsRoot (devicelibs_test.mdraid_test.SimpleRaidTest) ... skipped 'requires root privileges'
testRaid (devicelibs_test.raid_test.RaidTestCase) ... ok
testSwap (devicelibs_test.swap_test.SwapTestCase) ... skipped 'requires root privileges'
testBTRFSDeviceInit (devices_test.BTRFSDeviceTestCase)
Tests the state of a BTRFSDevice after initialization. ... ok
testBTRFSDeviceMethods (devices_test.BTRFSDeviceTestCase)
Test for method calls on initialized BTRFS Devices. ... ok
testBTRFSSnapShotDeviceInit (devices_test.BTRFSDeviceTestCase) ... ok
testLogicalVolume (devices_test.DeviceNameTestCase) ... ok
testStorageDevice (devices_test.DeviceNameTestCase) ... ok
testVolumeGroup (devices_test.DeviceNameTestCase) ... ok
testLVMSnapShotDeviceInit (devices_test.LVMDeviceTest) ... dm.c: 1693: not running as root returning empty list
ok
testLVMThinSnapShotDeviceInit (devices_test.LVMDeviceTest) ... ok
testMDRaidArrayDeviceInit (devices_test.MDRaidArrayDeviceTestCase)
Tests the state of a MDRaidArrayDevice after initialization. ... ok
testMDRaidArrayDeviceMethods (devices_test.MDRaidArrayDeviceTestCase)
Test for method calls on initialized MDRaidDevices. ... ok
testNetDevSetting (devices_test.NetDevMountOptionTestCase)
Verify netdev mount option setting after format assignment. ... ok
testNetDevUpdate (devices_test.NetDevMountOptionTestCase)
Verify netdev mount option setting after device creation. ... ok
runTest (devicetree_test.BlivetResetTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMOnMDTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMRaidTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMSnapShotTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMThinSnapShotTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMThinpTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.MDRaid0TestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
testFormatsMethods (formats_test.init_test.FormatsTestCase) ... ok
testCreating (formats_test.labeling_test.Ext2FSTestCase)
Create the filesystem when passing a valid label. ... skipped 'requires root privileges'
testCreatingEmpty (formats_test.labeling_test.Ext2FSTestCase)
Create a filesystem with an empty label. ... skipped 'requires root privileges'
testCreatingNone (formats_test.labeling_test.Ext2FSTestCase)
Create a filesystem with the label None. ... skipped 'requires root privileges'
testLabeling (formats_test.labeling_test.Ext2FSTestCase)
A sequence of tests of filesystem labeling. ... skipped 'requires root privileges'
testCreating (formats_test.labeling_test.FATFSTestCase)
Create the filesystem when passing a valid label. ... skipped 'requires root privileges'
testCreatingEmpty (formats_test.labeling_test.FATFSTestCase)
Create a filesystem with an empty label. ... skipped 'requires root privileges'
testCreatingNone (formats_test.labeling_test.FATFSTestCase)
Create a filesystem with the label None. ... skipped 'requires root privileges'
testLabeling (formats_test.labeling_test.FATFSTestCase)
A sequence of tests of filesystem labeling. ... skipped 'requires root privileges'
testCreating (formats_test.labeling_test.HFSTestCase)
Create the filesystem when passing a valid label ... skipped 'requires root privileges'
testCreatingEmpty (formats_test.labeling_test.HFSTestCase)
Create the filesystem when passing the empty label. ... skipped 'requires root privileges'
testCreatingNone (formats_test.labeling_test.HFSTestCase)
Create the filesystem when passing None ... skipped 'requires root privileges'
testLabeling (formats_test.labeling_test.HFSTestCase)
A sequence of tests of filesystem labeling. ... skipped 'requires root privileges'
testLabels (formats_test.labeling_test.InitializationTestCase)
Initialize some filesystems with valid and invalid labels. ... ok
testCreating (formats_test.labeling_test.JFSTestCase)
Create the filesystem when passing a valid label ... skipped 'requires root privileges'
testCreatingEmpty (formats_test.labeling_test.JFSTestCase)
Create the filesystem when passing the empty label. ... skipped 'requires root privileges'
testCreatingNone (formats_test.labeling_test.JFSTestCase)
Create the filesystem when passing None ... skipped 'requires root privileges'
testLabeling (formats_test.labeling_test.JFSTestCase)
A sequence of tests of filesystem labeling. ... skipped 'requires root privileges'
testCreatingSwapSpaceEmpty (formats_test.labeling_test.LabelingSwapSpaceTestCase) ... skipped 'requires root privileges'
testCreatingSwapSpaceNone (formats_test.labeling_test.LabelingSwapSpaceTestCase) ... skipped 'requires root privileges'
testLabeling (formats_test.labeling_test.LabelingSwapSpaceTestCase) ... skipped 'requires root privileges'
testGetLabelArgs (formats_test.labeling_test.MethodsTestCase) ... ok
testCreating (formats_test.labeling_test.ReiserFSTestCase)
Create the filesystem when passing a valid label ... skipped 'requires root privileges'
testCreatingEmpty (formats_test.labeling_test.ReiserFSTestCase)
Create the filesystem when passing the empty label. ... skipped 'requires root privileges'
testCreatingNone (formats_test.labeling_test.ReiserFSTestCase)
Create the filesystem when passing None ... skipped 'requires root privileges'
testLabeling (formats_test.labeling_test.ReiserFSTestCase)
A sequence of tests of filesystem labeling. ... skipped 'requires root privileges'
testCreating (formats_test.labeling_test.XFSTestCase)
Create the filesystem when passing a valid label. ... skipped 'requires root privileges'
testCreatingEmpty (formats_test.labeling_test.XFSTestCase)
Create a filesystem with an empty label. ... skipped 'requires root privileges'
testCreatingNone (formats_test.labeling_test.XFSTestCase)
Create a filesystem with the label None. ... skipped 'requires root privileges'
testLabeling (formats_test.labeling_test.XFSTestCase)
A sequence of tests of filesystem labeling. ... skipped 'requires root privileges'
testMountingExt2FS (formats_test.selinux_test.SELinuxContextTestCase) ... skipped 'requires root privileges'
testMountingXFS (formats_test.selinux_test.SELinuxContextTestCase) ... skipped 'requires root privileges'
testDeviceParents (parentlist_test.ParentListTestCase)
Verify that Device.parents functions as expected. ... ok
testParentList (parentlist_test.ParentListTestCase) ... ok
testExplicitExtendedPartitions (partitioning_test.ExtendedPartitionTestCase)
Verify that explicitly requested extended partitions work. ... skipped 'jenkins only test'
testImplicitExtendedPartitions (partitioning_test.ExtendedPartitionTestCase)
Verify management of implicitly requested extended partition. ... skipped 'jenkins only test'
testImplicitExtendedPartitionsInstallerMode (partitioning_test.ExtendedPartitionTestCase) ... skipped 'jenkins only test'
testAddPartition (partitioning_test.PartitioningTestCase) ... ok
testChunk (partitioning_test.PartitioningTestCase) ... ok
testDiskChunk1 (partitioning_test.PartitioningTestCase) ... ERROR
testDiskChunk2 (partitioning_test.PartitioningTestCase) ... ERROR
testNextPartitionType (partitioning_test.PartitioningTestCase) ... ok
testVGChunk (partitioning_test.PartitioningTestCase) ... ok
testNoKey (sanity_check_test.LUKSKeyTestCase) ... ERROR
testWithKey (sanity_check_test.LUKSKeyTestCase) ... ERROR
testExceptions (size_test.SizeTestCase) ... ok
testHumanReadable (size_test.SizeTestCase) ... ok
testNegative (size_test.SizeTestCase) ... ok
testPartialBytes (size_test.SizeTestCase) ... ok
testPrefixes (size_test.SizeTestCase) ... ok
testTranslated (size_test.SizeTestCase) ... ok
runTest (tsort_test.TopologicalSortTestCase) ... ok
test_udev_enumerate_devices (udev_test.UdevTest) ... ok
test_udev_get_device_1 (udev_test.UdevTest) ... ok
test_udev_get_device_2 (udev_test.UdevTest) ... ok
test_udev_get_device_3 (udev_test.UdevTest) ... ok
test_udev_get_devices (udev_test.UdevTest) ... ok
test_udev_parse_uevent_file_1 (udev_test.UdevTest) ... skipped 'this test requires the presence of /dev/loop1'
test_udev_parse_uevent_file_2 (udev_test.UdevTest) ... skipped 'this test requires the presence of /dev/loop1'

======================================================================
ERROR: testActionApplyCancel (action_test.DeviceActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/action_test.py", line 35, in setUp
    super(DeviceActionTestCase, self).setUp()
  File "tests/storagetestcase.py", line 26, in setUp
    self.storage = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testActionCreation (action_test.DeviceActionTestCase)
Verify correct operation of action class constructors.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/action_test.py", line 35, in setUp
    super(DeviceActionTestCase, self).setUp()
  File "tests/storagetestcase.py", line 26, in setUp
    self.storage = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testActionDependencies (action_test.DeviceActionTestCase)
Verify correct functioning of action dependencies.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/action_test.py", line 35, in setUp
    super(DeviceActionTestCase, self).setUp()
  File "tests/storagetestcase.py", line 26, in setUp
    self.storage = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testActionObsoletes (action_test.DeviceActionTestCase)
Verify correct operation of DeviceAction.obsoletes.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/action_test.py", line 35, in setUp
    super(DeviceActionTestCase, self).setUp()
  File "tests/storagetestcase.py", line 26, in setUp
    self.storage = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testActionPruning (action_test.DeviceActionTestCase)
Verify correct functioning of action pruning.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/action_test.py", line 35, in setUp
    super(DeviceActionTestCase, self).setUp()
  File "tests/storagetestcase.py", line 26, in setUp
    self.storage = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testActionRegistration (action_test.DeviceActionTestCase)
Verify correct operation of action registration and cancelling.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/action_test.py", line 35, in setUp
    super(DeviceActionTestCase, self).setUp()
  File "tests/storagetestcase.py", line 26, in setUp
    self.storage = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testActionSorting (action_test.DeviceActionTestCase)
Verify correct functioning of action sorting.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/action_test.py", line 35, in setUp
    super(DeviceActionTestCase, self).setUp()
  File "tests/storagetestcase.py", line 26, in setUp
    self.storage = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testActions (action_test.DeviceActionTestCase)
Verify correct management of actions.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/action_test.py", line 35, in setUp
    super(DeviceActionTestCase, self).setUp()
  File "tests/storagetestcase.py", line 26, in setUp
    self.storage = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testContainerActions (action_test.DeviceActionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/action_test.py", line 35, in setUp
    super(DeviceActionTestCase, self).setUp()
  File "tests/storagetestcase.py", line 26, in setUp
    self.storage = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testShouldClear (clearpart_test.ClearPartTestCase)
Test the Blivet.shouldClear method.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/clearpart_test.py", line 15, in testShouldClear
    b = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testMDFactory (devicefactory_test.MDFactoryTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicefactory_test.py", line 19, in setUp
    self.b = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testDiskChunk1 (partitioning_test.PartitioningTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/partitioning_test.py", line 304, in testDiskChunk1
    allocatePartitions(b, disks, partitions, free)
  File "blivet/partitioning.py", line 1163, in allocatePartitions
    temp_parts, freespace)
  File "blivet/partitioning.py", line 1808, in getDiskChunks
    if f.contains(p.partedPartition.geometry):
AttributeError: 'NoneType' object has no attribute 'geometry'

======================================================================
ERROR: testDiskChunk2 (partitioning_test.PartitioningTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/partitioning_test.py", line 367, in testDiskChunk2
    allocatePartitions(b, disks, partitions, free)
  File "blivet/partitioning.py", line 1163, in allocatePartitions
    temp_parts, freespace)
  File "blivet/partitioning.py", line 1808, in getDiskChunks
    if f.contains(p.partedPartition.geometry):
AttributeError: 'NoneType' object has no attribute 'geometry'

======================================================================
ERROR: testNoKey (sanity_check_test.LUKSKeyTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/sanity_check_test.py", line 35, in testNoKey
    b = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

======================================================================
ERROR: testWithKey (sanity_check_test.LUKSKeyTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/atodorov/rpmbuild/BUILD/blivet-0.61.0.23/tests/sanity_check_test.py", line 44, in testWithKey
    b = blivet.Blivet()
  File "blivet/__init__.py", line 338, in __init__
    self.setDefaultFSType(get_default_filesystem_type())
  File "blivet/__init__.py", line 1905, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "blivet/__init__.py", line 1880, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent ext4 filesystem is not valid as a default fs type

----------------------------------------------------------------------
Ran 139 tests in 2.338s

FAILED (errors=15, skipped=82)
make: *** [test] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.DTZoGh (%check)

Comment 4 Alexander Todorov 2015-01-23 14:04:24 UTC
Rebuilding the package as root and executing the test suite in %check gives:


+ make test
*** Running unittests ***
PYTHONPATH=.:tests/ python -m unittest discover -v -s tests/ -p '*_test.py'
testActionApplyCancel (action_test.DeviceActionTestCase) ... ok
testActionCreation (action_test.DeviceActionTestCase)
Verify correct operation of action class constructors. ... ok
testActionDependencies (action_test.DeviceActionTestCase)
Verify correct functioning of action dependencies. ... ok
testActionObsoletes (action_test.DeviceActionTestCase)
Verify correct operation of DeviceAction.obsoletes. ... ok
testActionPruning (action_test.DeviceActionTestCase)
Verify correct functioning of action pruning. ... ok
testActionRegistration (action_test.DeviceActionTestCase)
Verify correct operation of action registration and cancelling. ... ok
testActionSorting (action_test.DeviceActionTestCase)
Verify correct functioning of action sorting. ... ok
testActions (action_test.DeviceActionTestCase)
Verify correct management of actions. ... ok
testContainerActions (action_test.DeviceActionTestCase) ... ok
testInitializeDisk (clearpart_test.ClearPartTestCase) ... ok
testRecursiveRemove (clearpart_test.ClearPartTestCase) ... ok
testShouldClear (clearpart_test.ClearPartTestCase)
Test the Blivet.shouldClear method. ... ok
testMDFactory (devicefactory_test.MDFactoryTestCase) ... ok
testMkfsDefaults (devicelibs_test.btrfs_test.BTRFSAsRootTestCase1) ... ok
testUnmountedBTRFS (devicelibs_test.btrfs_test.BTRFSAsRootTestCase1)
A series of simple tests on an unmounted file system. ... ok
testSubvolume (devicelibs_test.btrfs_test.BTRFSAsRootTestCase2)
Tests which focus on subvolumes. ... ok
testSmallDevice (devicelibs_test.btrfs_test.BTRFSAsRootTestCase3)
Creation of a smallish device will result in an error if the ... ERROR
testCryptoMisc (devicelibs_test.crypto_test.CryptoTestCase) ... 
ok
testCryptoOpen (devicelibs_test.crypto_test.CryptoTestCase2) ... ok
testPassphrase (devicelibs_test.crypto_test.CryptoTestCase3) ... ok
testSanitize (devicelibs_test.dasd_test.SanitizeTest) ... ok
test_bad_device_path (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_bad_host_bus (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_biosdev_to_edd_dir (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_collect_edd_data (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_collect_edd_data_cciss (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_edd_entry_str (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
test_get_edd_dict_1 (devicelibs_test.edd_test.EddTestCase)
Test get_edd_dict()'s pci_dev matching. ... skipped 'not implemented'
test_get_edd_dict_2 (devicelibs_test.edd_test.EddTestCase)
Test get_edd_dict()'s pci_dev matching. ... skipped 'not implemented'
test_get_edd_dict_3 (devicelibs_test.edd_test.EddTestCase)
Test scenario when the 0x80 and 0x81 edd directories contain the ... skipped 'not implemented'
test_matcher_device_path (devicelibs_test.edd_test.EddTestCase) ... skipped 'not implemented'
testLVM (devicelibs_test.lvm_test.LVMAsRootTestCase) ... ok
testClampSize (devicelibs_test.lvm_test.LVMTestCase) ... ok
testGetPossiblePhysicalExtents (devicelibs_test.lvm_test.LVMTestCase) ... ok
test_backup_disabled (devicelibs_test.lvm_test.LVM_Metadata_Backup_TestCase) ... ok
test_backup_enabled (devicelibs_test.lvm_test.LVM_Metadata_Backup_TestCase) ... ok
testMDDetail (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase) ... ok
testMDDetail0_90 (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase) ... ok
testMDDetailContainerDefault (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase) ... FAIL
testMDDetailMDDevice (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase) ... ok
testMDDetailSpares (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase) ... ok
testMDExamine0 (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... ok
testMDExamine0_90 (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... ok
testMDExamine1 (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... ok
testMDExamine1_2 (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... ok
testMDExamineContainerDefault (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... ok
testMDExamineDefault (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... ok
testMDExamineMDRaidArray (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... ok
testMDExamineNonMDRaid (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... ok
testMDExamineSpares (devicelibs_test.mdraid_interrogate_test.MDExamineTestCase) ... ok
testMDRaid (devicelibs_test.mdraid_test.MDRaidTestCase) ... ok
testMisc (devicelibs_test.mdraid_test.MDRaidTestCase)
Miscellaneous testing. ... ok
testGrow (devicelibs_test.mdraid_test.RAID0Test) ... ok
testGrowRAID1 (devicelibs_test.mdraid_test.RAID0Test) ... ok
testGrowSimple (devicelibs_test.mdraid_test.RAID0Test) ... ok
testGrowSmaller (devicelibs_test.mdraid_test.RAID0Test) ... ok
testGrowTooBig (devicelibs_test.mdraid_test.RAID0Test) ... ok
testMDRaidAsRoot (devicelibs_test.mdraid_test.SimpleRaidTest) ... ERROR
testRaid (devicelibs_test.raid_test.RaidTestCase) ... ok
testSwap (devicelibs_test.swap_test.SwapTestCase) ... ok
testBTRFSDeviceInit (devices_test.BTRFSDeviceTestCase)
Tests the state of a BTRFSDevice after initialization. ... ok
testBTRFSDeviceMethods (devices_test.BTRFSDeviceTestCase)
Test for method calls on initialized BTRFS Devices. ... ok
testBTRFSSnapShotDeviceInit (devices_test.BTRFSDeviceTestCase) ... ok
testLogicalVolume (devices_test.DeviceNameTestCase) ... ok
testStorageDevice (devices_test.DeviceNameTestCase) ... ok
testVolumeGroup (devices_test.DeviceNameTestCase) ... ok
testLVMSnapShotDeviceInit (devices_test.LVMDeviceTest) ... ok
testLVMThinSnapShotDeviceInit (devices_test.LVMDeviceTest) ... ok
testMDRaidArrayDeviceInit (devices_test.MDRaidArrayDeviceTestCase)
Tests the state of a MDRaidArrayDevice after initialization. ... ok
testMDRaidArrayDeviceMethods (devices_test.MDRaidArrayDeviceTestCase)
Test for method calls on initialized MDRaidDevices. ... ok
testNetDevSetting (devices_test.NetDevMountOptionTestCase)
Verify netdev mount option setting after format assignment. ... ok
testNetDevUpdate (devices_test.NetDevMountOptionTestCase)
Verify netdev mount option setting after device creation. ... ok
runTest (devicetree_test.BlivetResetTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMOnMDTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMRaidTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMSnapShotTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMThinSnapShotTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.LVMThinpTestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
runTest (devicetree_test.MDRaid0TestCase)
Verify that the devices and their attributes match across reset. ... skipped 'jenkins only test'
testFormatsMethods (formats_test.init_test.FormatsTestCase) ... ok
testCreating (formats_test.labeling_test.Ext2FSTestCase)
Create the filesystem when passing a valid label. ... ok
testCreatingEmpty (formats_test.labeling_test.Ext2FSTestCase)
Create a filesystem with an empty label. ... ok
testCreatingNone (formats_test.labeling_test.Ext2FSTestCase)
Create a filesystem with the label None. ... ok
testLabeling (formats_test.labeling_test.Ext2FSTestCase)
A sequence of tests of filesystem labeling. ... ok
testCreating (formats_test.labeling_test.FATFSTestCase)
Create the filesystem when passing a valid label. ... FAIL
testCreatingEmpty (formats_test.labeling_test.FATFSTestCase)
Create a filesystem with an empty label. ... ok
testCreatingNone (formats_test.labeling_test.FATFSTestCase)
Create a filesystem with the label None. ... ok
testLabeling (formats_test.labeling_test.FATFSTestCase)
A sequence of tests of filesystem labeling. ... ERROR
testCreating (formats_test.labeling_test.HFSTestCase)
Create the filesystem when passing a valid label ... skipped 'utilities unavailable for filesystem hfs'
testCreatingEmpty (formats_test.labeling_test.HFSTestCase)
Create the filesystem when passing the empty label. ... skipped 'utilities unavailable for filesystem hfs'
testCreatingNone (formats_test.labeling_test.HFSTestCase)
Create the filesystem when passing None ... skipped 'utilities unavailable for filesystem hfs'
testLabeling (formats_test.labeling_test.HFSTestCase)
A sequence of tests of filesystem labeling. ... skipped 'utilities unavailable for filesystem hfs'
testLabels (formats_test.labeling_test.InitializationTestCase)
Initialize some filesystems with valid and invalid labels. ... ok
testCreating (formats_test.labeling_test.JFSTestCase)
Create the filesystem when passing a valid label ... skipped 'utilities unavailable for filesystem jfs'
testCreatingEmpty (formats_test.labeling_test.JFSTestCase)
Create the filesystem when passing the empty label. ... skipped 'utilities unavailable for filesystem jfs'
testCreatingNone (formats_test.labeling_test.JFSTestCase)
Create the filesystem when passing None ... skipped 'utilities unavailable for filesystem jfs'
testLabeling (formats_test.labeling_test.JFSTestCase)
A sequence of tests of filesystem labeling. ... skipped 'utilities unavailable for filesystem jfs'
testCreatingSwapSpaceEmpty (formats_test.labeling_test.LabelingSwapSpaceTestCase) ... ok
testCreatingSwapSpaceNone (formats_test.labeling_test.LabelingSwapSpaceTestCase) ... ok
testLabeling (formats_test.labeling_test.LabelingSwapSpaceTestCase) ... ok
testGetLabelArgs (formats_test.labeling_test.MethodsTestCase) ... ok
testCreating (formats_test.labeling_test.ReiserFSTestCase)
Create the filesystem when passing a valid label ... skipped 'utilities unavailable for filesystem reiserfs'
testCreatingEmpty (formats_test.labeling_test.ReiserFSTestCase)
Create the filesystem when passing the empty label. ... skipped 'utilities unavailable for filesystem reiserfs'
testCreatingNone (formats_test.labeling_test.ReiserFSTestCase)
Create the filesystem when passing None ... skipped 'utilities unavailable for filesystem reiserfs'
testLabeling (formats_test.labeling_test.ReiserFSTestCase)
A sequence of tests of filesystem labeling. ... skipped 'utilities unavailable for filesystem reiserfs'
testCreating (formats_test.labeling_test.XFSTestCase)
Create the filesystem when passing a valid label. ... ok
testCreatingEmpty (formats_test.labeling_test.XFSTestCase)
Create a filesystem with an empty label. ... ok
testCreatingNone (formats_test.labeling_test.XFSTestCase)
Create a filesystem with the label None. ... ok
testLabeling (formats_test.labeling_test.XFSTestCase)
A sequence of tests of filesystem labeling. ... ok
testMountingExt2FS (formats_test.selinux_test.SELinuxContextTestCase) ... FAIL
testMountingXFS (formats_test.selinux_test.SELinuxContextTestCase) ... FAIL
testDeviceParents (parentlist_test.ParentListTestCase)
Verify that Device.parents functions as expected. ... ok
testParentList (parentlist_test.ParentListTestCase) ... ok
testExplicitExtendedPartitions (partitioning_test.ExtendedPartitionTestCase)
Verify that explicitly requested extended partitions work. ... skipped 'jenkins only test'
testImplicitExtendedPartitions (partitioning_test.ExtendedPartitionTestCase)
Verify management of implicitly requested extended partition. ... skipped 'jenkins only test'
testImplicitExtendedPartitionsInstallerMode (partitioning_test.ExtendedPartitionTestCase) ... skipped 'jenkins only test'
testAddPartition (partitioning_test.PartitioningTestCase) ... ok
testChunk (partitioning_test.PartitioningTestCase) ... ok
testDiskChunk1 (partitioning_test.PartitioningTestCase) ... ERROR
testDiskChunk2 (partitioning_test.PartitioningTestCase) ... ERROR
testNextPartitionType (partitioning_test.PartitioningTestCase) ... ok
testVGChunk (partitioning_test.PartitioningTestCase) ... ok
testNoKey (sanity_check_test.LUKSKeyTestCase) ... ok
testWithKey (sanity_check_test.LUKSKeyTestCase) ... ok
testExceptions (size_test.SizeTestCase) ... ok
testHumanReadable (size_test.SizeTestCase) ... ok
testNegative (size_test.SizeTestCase) ... ok
testPartialBytes (size_test.SizeTestCase) ... ok
testPrefixes (size_test.SizeTestCase) ... ok
testTranslated (size_test.SizeTestCase) ... ok
runTest (tsort_test.TopologicalSortTestCase) ... ok
test_udev_enumerate_devices (udev_test.UdevTest) ... ok
test_udev_get_device_1 (udev_test.UdevTest) ... ok
test_udev_get_device_2 (udev_test.UdevTest) ... ok
test_udev_get_device_3 (udev_test.UdevTest) ... ok
test_udev_get_devices (udev_test.UdevTest) ... ok
test_udev_parse_uevent_file_1 (udev_test.UdevTest) ... ok
test_udev_parse_uevent_file_2 (udev_test.UdevTest) ... ok

======================================================================
ERROR: testSmallDevice (devicelibs_test.btrfs_test.BTRFSAsRootTestCase3)
Creation of a smallish device will result in an error if the
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicelibs_test/btrfs_test.py", line 179, in testSmallDevice
    self.assertEqual(btrfs.create_volume(self.loopDevices), 0)
  File "blivet/devicelibs/btrfs.py", line 85, in create_volume
    raise BTRFSError(ret)
BTRFSError: 1

======================================================================
ERROR: testMDRaidAsRoot (devicelibs_test.mdraid_test.SimpleRaidTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicelibs_test/mdraid_test.py", line 196, in testMDRaidAsRoot
    info_post = mdraid.mddetail(self._dev_name)
  File "blivet/devicelibs/mdraid.py", line 338, in mddetail
    raise MDRaidError("mddetail failed for %s: %s" % (device, e))
MDRaidError: mddetail failed for /dev/md0: 1

======================================================================
ERROR: testLabeling (formats_test.labeling_test.FATFSTestCase)
A sequence of tests of filesystem labeling.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/formats_test/fslabeling.py", line 121, in testLabeling
    self.assertIsNone(an_fs.writeLabel())
  File "blivet/formats/fs.py", line 676, in writeLabel
    raise FSError("label failed")
FSError: label failed

======================================================================
ERROR: testDiskChunk1 (partitioning_test.PartitioningTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/partitioning_test.py", line 304, in testDiskChunk1
    allocatePartitions(b, disks, partitions, free)
  File "blivet/partitioning.py", line 1163, in allocatePartitions
    temp_parts, freespace)
  File "blivet/partitioning.py", line 1808, in getDiskChunks
    if f.contains(p.partedPartition.geometry):
AttributeError: 'NoneType' object has no attribute 'geometry'

======================================================================
ERROR: testDiskChunk2 (partitioning_test.PartitioningTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/partitioning_test.py", line 367, in testDiskChunk2
    allocatePartitions(b, disks, partitions, free)
  File "blivet/partitioning.py", line 1163, in allocatePartitions
    temp_parts, freespace)
  File "blivet/partitioning.py", line 1808, in getDiskChunks
    if f.contains(p.partedPartition.geometry):
AttributeError: 'NoneType' object has no attribute 'geometry'

======================================================================
FAIL: testMDDetailContainerDefault (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicelibs_test/mdraid_interrogate_test.py", line 237, in testMDDetailContainerDefault
    self._testMDDetail(self.names_container, level="container")
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicelibs_test/mdraid_interrogate_test.py", line 204, in _testMDDetail
    self._matchNames(info.keys(), names, ['RESYNC STATUS'])
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicelibs_test/mdraid_interrogate_test.py", line 30, in _matchNames
    self.assertIn(n, expected, msg="unexpected name '%s' in info" % n)
AssertionError: unexpected name 'SEQ' in info

======================================================================
FAIL: testCreating (formats_test.labeling_test.FATFSTestCase)
Create the filesystem when passing a valid label.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/formats_test/fslabeling.py", line 142, in testCreating
    self.assertEqual(an_fs.readLabel(), "start")
AssertionError: 'NO NAME' != 'start'

======================================================================
FAIL: testMountingExt2FS (formats_test.selinux_test.SELinuxContextTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/formats_test/selinux_test.py", line 36, in testMountingExt2FS
    self.assertEqual(root_selinux_context[1], 'system_u:object_r:file_t:s0')
AssertionError: 'system_u:object_r:unlabeled_t:s0' != 'system_u:object_r:file_t:s0'

======================================================================
FAIL: testMountingXFS (formats_test.selinux_test.SELinuxContextTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/formats_test/selinux_test.py", line 76, in testMountingXFS
    self.assertEqual(root_selinux_context[1], 'system_u:object_r:file_t:s0')
AssertionError: 'system_u:object_r:unlabeled_t:s0' != 'system_u:object_r:file_t:s0'

----------------------------------------------------------------------
Ran 139 tests in 165.817s

FAILED (failures=4, errors=5, skipped=33)
make: *** [test] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.xwZHEx (%check)



I'm OK with lots of skipped tests (QE will be re-testing as root nevertheless) but at least it shouldn't crash. Not to mention python-mock is still not included in RHEL.

Comment 5 mulhern 2015-01-26 16:49:57 UTC
I'm guessing that the filesystem's mountable property turned out to be False.

This is how mountable prop is calculated:

    @property
    def mountable(self):
        canmount = (self.mountType in kernel_filesystems) or \
                   (os.access("/sbin/mount.%s" % (self.mountType,), os.X_OK))
        modpath = os.path.realpath(os.path.join("/lib/modules", os.uname()[2]))
        modname = "%s.ko" % self.mountType

        if not canmount and os.path.isdir(modpath):
            for _root, _dirs, files in os.walk(modpath):
                have = [x for x in files if x.startswith(modname)]
                if len(have) == 1 and have[0].startswith(modname):
                    return True

        return canmount

Since, if run as root, mountable is True, as we can tell by comment (4), this probably means that there is some strange behavior of os.access. Presumably there is nothing for mounting in modpath either, or else it is inaccessable as non root. Of course, it works for me.

I've placed an image at http://mulhern.fedorapeople.org/1072897.img which should tell us the difference.

Can you apply the image, run both as root and not as root, and post storage.log and program.log for each?

You should expect to see additional 1072897 debugging output in storage.log.

- mulhern

Comment 6 Alexander Todorov 2015-01-27 11:52:25 UTC
(In reply to mulhern from comment #5)
> I've placed an image at http://mulhern.fedorapeople.org/1072897.img which
> should tell us the difference.
> 

I'm testin gblivet in stand-alone mode, not as part of installation image. Better post the patch used as I have no idea how an updates.img will help me in this case.

Comment 7 mulhern 2015-01-27 21:29:35 UTC
Created attachment 984878 [details]
adds a little debugging output

Comment 8 mulhern 2015-01-27 21:32:46 UTC
I've attached a patch.

Please keep in mind the following:

* This patch is for the most recent version of rawhide. If you're checking out the code it should work. If you're working with the most recent version I'll have to give you another patch.
* The blivet tests do not generally do any logging. I've added some code that will dump the combined program and storage logs to /tmp/blivet.log. Be aware that every run will append to the log.

Comment 9 Alexander Todorov 2015-01-29 10:03:27 UTC
Created attachment 985500 [details]
blivet.log

I've modified your patch slightly so it fits into the RHEL7.1 version of blivet. The above log was produced after the patch while the console says:


test_udev_parse_uevent_file_1 (udev_test.UdevTest) ... ok
test_udev_parse_uevent_file_2 (udev_test.UdevTest) ... ok
testMDFactory (devicefactory_test.MDFactoryTestCase) ... ok

======================================================================
ERROR: testSmallDevice (devicelibs_test.btrfs_test.BTRFSAsRootTestCase3)
Creation of a smallish device will result in an error if the
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicelibs_test/btrfs_test.py", line 179, in testSmallDevice
    self.assertEqual(btrfs.create_volume(self.loopDevices), 0)
  File "blivet/devicelibs/btrfs.py", line 85, in create_volume
    raise BTRFSError(ret)
BTRFSError: 1

======================================================================
ERROR: testMDRaidAsRoot (devicelibs_test.mdraid_test.SimpleRaidTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicelibs_test/mdraid_test.py", line 196, in testMDRaidAsRoot
    info_post = mdraid.mddetail(self._dev_name)
  File "blivet/devicelibs/mdraid.py", line 338, in mddetail
    raise MDRaidError("mddetail failed for %s: %s" % (device, e))
MDRaidError: mddetail failed for /dev/md0: 1

======================================================================
ERROR: testLabeling (formats_test.labeling_test.FATFSTestCase)
A sequence of tests of filesystem labeling.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/formats_test/fslabeling.py", line 121, in testLabeling
    self.assertIsNone(an_fs.writeLabel())
  File "blivet/formats/fs.py", line 676, in writeLabel
    raise FSError("label failed")
FSError: label failed

======================================================================
ERROR: testDiskChunk1 (partitioning_test.PartitioningTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/partitioning_test.py", line 304, in testDiskChunk1
    allocatePartitions(b, disks, partitions, free)
  File "blivet/partitioning.py", line 1163, in allocatePartitions
    temp_parts, freespace)
  File "blivet/partitioning.py", line 1808, in getDiskChunks
    if f.contains(p.partedPartition.geometry):
AttributeError: 'NoneType' object has no attribute 'geometry'

======================================================================
ERROR: testDiskChunk2 (partitioning_test.PartitioningTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/partitioning_test.py", line 367, in testDiskChunk2
    allocatePartitions(b, disks, partitions, free)
  File "blivet/partitioning.py", line 1163, in allocatePartitions
    temp_parts, freespace)
  File "blivet/partitioning.py", line 1808, in getDiskChunks
    if f.contains(p.partedPartition.geometry):
AttributeError: 'NoneType' object has no attribute 'geometry'

======================================================================
FAIL: testMDDetailContainerDefault (devicelibs_test.mdraid_interrogate_test.MDDetailTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicelibs_test/mdraid_interrogate_test.py", line 237, in testMDDetailContainerDefault
    self._testMDDetail(self.names_container, level="container")
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicelibs_test/mdraid_interrogate_test.py", line 204, in _testMDDetail
    self._matchNames(info.keys(), names, ['RESYNC STATUS'])
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/devicelibs_test/mdraid_interrogate_test.py", line 30, in _matchNames
    self.assertIn(n, expected, msg="unexpected name '%s' in info" % n)
AssertionError: unexpected name 'SEQ' in info

======================================================================
FAIL: testCreating (formats_test.labeling_test.FATFSTestCase)
Create the filesystem when passing a valid label.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/formats_test/fslabeling.py", line 142, in testCreating
    self.assertEqual(an_fs.readLabel(), "start")
AssertionError: 'NO NAME' != 'start'

======================================================================
FAIL: testMountingExt2FS (formats_test.selinux_test.SELinuxContextTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/formats_test/selinux_test.py", line 36, in testMountingExt2FS
    self.assertEqual(root_selinux_context[1], 'system_u:object_r:file_t:s0')
AssertionError: 'system_u:object_r:unlabeled_t:s0' != 'system_u:object_r:file_t:s0'

======================================================================
FAIL: testMountingXFS (formats_test.selinux_test.SELinuxContextTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/rpmbuild/BUILD/blivet-0.61.0.23/tests/formats_test/selinux_test.py", line 76, in testMountingXFS
    self.assertEqual(root_selinux_context[1], 'system_u:object_r:file_t:s0')
AssertionError: 'system_u:object_r:unlabeled_t:s0' != 'system_u:object_r:file_t:s0'

----------------------------------------------------------------------
Ran 139 tests in 167.137s

FAILED (failures=4, errors=5, skipped=33)
make: *** [test] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.05AGEP (%check)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.05AGEP (%check)

Comment 10 mulhern 2015-01-29 12:50:23 UTC
Is this a RHEL 7 or a rawhide bug? In Comment#9 you're testing on RHEL7, but the bz says it is rawhide.

At this point, based on the bz being rawhide and the previous comments, I am addressing the problem of ext4 being judged not mountable when running not as root (as described in Comment#3) on rawhide.

Comment 11 Alexander Todorov 2015-01-29 14:38:51 UTC
(In reply to mulhern from comment #10)
> Is this a RHEL 7 or a rawhide bug? In Comment#9 you're testing on RHEL7, but
> the bz says it is rawhide.
> 

Oh crap, I was assuming this is RHEL 7 b/c this is what we usually use. All my previous comments were on RHEL 7. Sorry for the confusion. 

I will get a Rawhide system for testing and report back to you. 

> 
> At this point, based on the bz being rawhide and the previous comments, I am
> addressing the problem of ext4 being judged not mountable when running not
> as root (as described in Comment#3) on rawhide.

Please hold-off for a while. I need to retest on Rawhide and see if comment #3 and #4 still hold true.

Comment 12 Alexander Todorov 2015-01-30 13:38:32 UTC
Created attachment 985991 [details]
blivet.log

I've tried `make test' on Rawhide, using latest git checkout as ROOT. I've got the following errors:



======================================================================
ERROR: testBTRFSDeviceInit (devices_test.BTRFSDeviceTestCase)
Tests the state of a BTRFSDevice after initialization.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/blivet/tests/devices_test.py", line 651, in testBTRFSDeviceInit
    BTRFSVolumeDevice("dev1", dataLevel="dup", parents=[deva])
  File "/usr/lib64/python2.7/unittest/case.py", line 163, in __exit__
    if not expected_regexp.search(str(exc_value)):
UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-8: ordinal not in range(128)

======================================================================
ERROR: testMDRaidArrayDeviceInit (devices_test.MDRaidArrayDeviceTestCase)
Tests the state of a MDRaidArrayDevice after initialization.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/blivet/tests/devices_test.py", line 534, in testMDRaidArrayDeviceInit
    MDRaidArrayDevice("dev")
  File "/usr/lib64/python2.7/unittest/case.py", line 163, in __exit__
    if not expected_regexp.search(str(exc_value)):
UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-8: ordinal not in range(128)

======================================================================
ERROR: testMDRaidArrayDeviceMethods (devices_test.MDRaidArrayDeviceTestCase)
Test for method calls on initialized MDRaidDevices.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/blivet/tests/devices_test.py", line 559, in testMDRaidArrayDeviceMethods
    self.dev7.level = "junk"
  File "/usr/lib64/python2.7/unittest/case.py", line 163, in __exit__
    if not expected_regexp.search(str(exc_value)):
UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-8: ordinal not in range(128)

======================================================================
FAIL: testGrow (devicelibs_test.mdraid_test.raid0GrowTestCase)
Tests growing a device by exactly 1.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/blivet/tests/devicelibs_test/mdraid_test.py", line 162, in testGrow
    self.assertEqual(int(info_pre[k]) + 1, int(info_post[k]), msg="key: %s" % k)
AssertionError: 3 != 4 : key: RAID DEVICES

----------------------------------------------------------------------
Ran 490 tests in 419.494s

FAILED (failures=1, errors=3, skipped=246)
Makefile:18: recipe for target 'test' failed
make: *** [test] Error 1

Comment 13 Alexander Todorov 2015-01-30 14:23:30 UTC
My console has LANG=bg_BG.utf8. Changing it to LANG=C before `make test` resolves the ascii codec errors.

The only error left is:


======================================================================
FAIL: testGrow (devicelibs_test.mdraid_test.raid0GrowTestCase)
Tests growing a device by exactly 1.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/blivet/tests/devicelibs_test/mdraid_test.py", line 162, in testGrow
    self.assertEqual(int(info_pre[k]) + 1, int(info_post[k]), msg="key: %s" % k)
AssertionError: 3 != 4 : key: RAID DEVICES

----------------------------------------------------------------------
Ran 490 tests in 416.775s

FAILED (failures=1, skipped=246)
Makefile:18: recipe for target 'test' failed

Comment 14 Alexander Todorov 2015-01-30 14:25:09 UTC
Testing on Rawhide as regular user (not ROOT) doesn't give me errors. 

----------------------------------------------------------------------
Ran 490 tests in 3.880s

OK (skipped=426)

Comment 15 Jaroslav Reznik 2015-03-03 16:59:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22


Note You need to log in before you can comment on or make changes to this bug.