Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edd more testcases #262

Closed
wants to merge 16 commits into from

Conversation

vathpela
Copy link
Contributor

This adds (on top of PR #261) a bunch more EDD test cases from various physical and virtual machines I've found.

@vathpela vathpela force-pushed the edd-more-testcases branch 4 times, most recently from ef96bf8 to b574168 Compare October 29, 2015 17:45
@bcl
Copy link
Contributor

bcl commented Oct 31, 2015

Other than those few comments I think I'm ok with this. Other eyes would be good, I'm afraid I didn't actually read every single line :)

@vathpela vathpela force-pushed the edd-more-testcases branch 4 times, most recently from 57e551a to 60ab01d Compare November 6, 2015 20:00
I'm just so, so tired of futzing around with os.path.join() and
os.path.normalize() not doing their jobs usefully.

This version of normalize doesn't try to resolve .. or symlinks; it only
de-dupes slashes.  I can't find anywhere we depend on resolving ..  or
symlinks, so it's just not as pretty as it could be.

So basically if you need to normalize slashes, use
util.normalize_path_slashes() .  If you need to resolve symlinks, use
os.path.normalize()

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
This also makes path joining simpler, and automagically normalizes
slashes reasonably.

Signed-off-by: Peter Jones <pjones@redhat.com>
Because seriously, code shouldn't have to care about if we do
get_sysfs_attr("/sys/foo/","bar") or get_sysfs_attr("/sys/foo","/bar")

This also makes these functions able to deal with an alternate root
directory separately from the sysfs path.

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
It's really annoying that there's no way to turn off
unittest.assertEqual()'s stupid string truncation, and it makes it very
difficult to debug test failures that involve a fairly large amount of
data.  So replace it with something that tells us the meaningful bits.

Signed-off-by: Peter Jones <pjones@redhat.com>
This lets us tell (and log) which edd entry we're probing.

Signed-off-by: Peter Jones <pjones@redhat.com>
This gets rid of EddEntry._sysfsroot and the sysfsroot property
entirely, because we don't need these at all any more with our Path
object.

This also tries to limit how much we manually interpolate the fsroot.

Signed-off-by: Peter Jones <pjones@redhat.com>
This way we can be sure we collect them for test cases.

Signed-off-by: Peter Jones <pjones@redhat.com>
This is probably always indicative of a bug in firmware or our matcher,
but that's still worth the logging.

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
The problem is that SeaBIOS (and thus our qemu VMs) doesn't enumerate ata
devices separately from PCI devices.  So on a real system,
EddEntry.ata_device should reset to 0 for each new PCI device, but on a
virt running SeaBIOS, they just count up monotonically.

So do the /right/ thing when we can, and if we don't find a correct
device, try relaxing the requirement on the scsi target id in sysfs, and
see if we find the right port number anyway.

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
So apparently if it actually shows the EDDv3 info on a SATA drive, it's
just a matter of luck.

Signed-off-by: Peter Jones <pjones@redhat.com>
This is data for seabios with
https://github.com/vathpela/seabios/tree/edd applied to try and actually
make EDD work on our virtual machines.

Signed-off-by: Peter Jones <pjones@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants