New: [rhinstaller/anaconda/pulls/19] Backport grub_raid_test.py from master
by dashea
A few notes here:
As is this test fails in grub_mbr_raid1_test(). See the lines:
```
expected_targets = set([(self.sda, self.boot_md), (self.sdb, self.boot_md)])
# expected_targets = set([(self.sda, self.sda2), (self.sdb, self.sdb2)])
```
If the second one is used instead of the first one then the result is PASS. This is due to different support for GRUB stage2 between master and rhel7-branch.
On RHEL7:
```
for stage2dev in self.stage2_device.parents:
# if target disk contains any of /boot array's member
# partitions, set up stage1 on each member's disk
# and stage2 on each member partition
stage1dev = stage2dev.disk
targets.append((stage1dev, stage2dev))
```
While on master:
```
for stage2dev in stage2_parents:
# if target disk contains any of /boot array's member
# partitions, set up stage1 on each member's disk
stage1dev = stage2dev.disk
targets.append((stage1dev, self.stage2_device))
```
Notice the self.stage2_device vs. stage2dev. The first one is the md1 partition while the second one is either sda2 or sdb2 - the mdraid member partitions. I don't know which one is the expected behavior for RHEL 7.
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/19
8 years, 11 months
New: [rhinstaller/anaconda/pulls/12] Remove W0123 which is not defined in older pylint and causes traceback
by dashea
Running the test suite on RHEL7 yields:
```
Traceback (most recent call last):
File "/usr/bin/pylint", line 9, in <module>
load_entry_point('pylint==1.0.0', 'console_scripts', 'pylint')()
File "/usr/lib/python2.7/site-packages/pylint/__init__.py", line 21, in run_pylint
Run(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 990, in __init__
args = linter.load_command_line_configuration(args)
File "/usr/lib/python2.7/site-packages/logilab/common/configuration.py", line 685, in load_command_line_configuration
(options, args) = self.cmdline_parser.parse_args(args=args)
File "/usr/lib64/python2.7/optparse.py", line 1399, in parse_args
stop = self._process_args(largs, rargs, values)
File "/usr/lib64/python2.7/optparse.py", line 1439, in _process_args
self._process_long_opt(rargs, values)
File "/usr/lib64/python2.7/optparse.py", line 1514, in _process_long_opt
option.process(opt, value, values, self)
File "/usr/lib/python2.7/site-packages/logilab/common/optik_ext.py", line 237, in process
self.action, self.dest, opt, value, values, parser)
File "/usr/lib64/python2.7/optparse.py", line 808, in take_action
self.callback(self, opt, value, parser, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/logilab/common/configuration.py", line 540, in cb_set_provider_option
self.global_set_option(opt, value)
File "/usr/lib/python2.7/site-packages/logilab/common/configuration.py", line 544, in global_set_option
self._all_options[opt].set_option(opt, value)
File "/usr/lib/python2.7/site-packages/pylint/lint.py", line 383, in set_option
meth(_id)
File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 251, in disable
msg = self.check_message_id(msgid)
File "/usr/lib/python2.7/site-packages/pylint/utils.py", line 315, in check_message_id
raise UnknownMessage('No such message id %s' % msgid)
pylint.utils.UnknownMessage: No such message id W0123
```
With this small fix it displays correct results from pylint:
```
FAIL: pylint/runpylint
======================
pylint reports the following issues:
************* Module ../pyanaconda/ui/gui/spokes/lib/resize.py
E0611: 25,0: : No name 'Gdk' in module 'gi.repository'
E0611: 25,0: : No name 'Gtk' in module 'gi.repository'
************* Module ../pyanaconda/anaconda.py
F0401:161,8: Anaconda.dumpState: Unable to import 'meh'
F0401:162,8: Anaconda.dumpState: Unable to import 'meh.dump'
```
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/12
8 years, 11 months