Testdrive not compatible with Virtualbox 4?

Bug #703816 reported by François Tissandier
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
TestDrive
Fix Released
Wishlist
Andres Rodriguez

Bug Description

I have installed Virtualbox 4 from Oracle website.
When I try to select it as the virtualisation option in TestDrive, I get this error message:

"Unable to validate Virtualization Method [virtualbox]"

Related branches

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi François,

TestDrive is not yet compatible with VirtualBox4. First, because it is not in the Ubuntu archives, secondly, It is hard to maintain th code when I hardly even use VirtualBox. I guess that once VirtualBox4-OSE hits Ubuntu, if it ever does, I'll add the compatibility.

Thank you.

Regards,

Changed in testdrive:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Dario Bertini (berdario) wrote :

I'm running VirtualBox4

I checked in the manual and all the commands used inside testdrive are unchanged.

I started to update the code for the version check (now the version is stored in a tuple of two ints instead of a string, so it's a little bit cleaner) to try to run it with VirtualBox4

from my test everything is working

I've linked the branch with my small little changes, if someone can review and merge it we can clear this bug :)

Changed in testdrive:
status: Triaged → In Progress
Revision history for this message
Dario Bertini (berdario) wrote :

I've also done a merge request on my branch... i don't know if linking it here was enough, but i hope everything's fine (this is my first merge request)

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Dario,

Thank you for adding the support, I was just about to do it myself :).

However, can you explain me the benefits of putting the version into a tuple instead of a string?

Thank you!

Changed in testdrive:
assignee: nobody → Andres Rodriguez (andreserl)
Changed in testdrive:
status: In Progress → Fix Committed
Revision history for this message
Dario Bertini (berdario) wrote :

Well, just look at the current line 69 of virtualbox.py
I understand how you prefer to not do further changes to the code (more changes == more possibility let slip some bug), but I find that

if (3,0) < self.vboxversion < (4,1):

or

if (3,1) <= self.vboxversion <= (4,0):

is more compact, more easy to understand, less prone to error and quicker to update when a new virtualbox version will be released than

if self.vboxversion == (3,1) or self.vboxversion == (3,2) or self.vboxversion == (4,0):

using a tuple for specifying the version is also quite common:

>>> import sys
>>> sys.version_info
(2, 6, 6, 'final', 0)

on the other hand, you may prefer to explicitly specify every single version of virtualbox that it's supported, rather than a range, but i don't think this has any added value
I mean: I don't think either that using a range is sloppy:

the tuple comparison is guaranteed to work in the same way as a comparison on its elements, and if oracle would release a virtualbox 3.3 (theoretically possible) that would break compatibility with _both_ 3.2 and 4.0, the blame would lie on them (it could very well be that a virtualbox 4.1 may instead break compatibility, but all of the previous checks shield us against that)...

also, since the elements of the tuple are integers, it's impossible to have a (3,1) < self.vboxversion < (3,2) == True

Keep up the good work and have a nice day :)

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Dario,

I did indeed merged some of your changes, and the reason why I kept the explicit versions instead of the comparing range is because there's still some differences between VBox versions that I'd like to address in the near future, and for now, I believe is better to keep the explicit versions till I address them.

Thank you for your contribution!! :) And again, if you are VBox expert and would like to continue to improve the VBox code, or even maintain it, please, do so!! I'd be more than happy to have someone actively maintaining that part of the code as I don't really use VBox.

Thanks again!

Revision history for this message
Dario Bertini (berdario) wrote :

Actually, I don't use virtualbox very often, so I can't really deem myself an expert... for sure if it'll happen that I'll have a need to "scratch some itch", I'll do that :) ...but, as of now, I don't really think I can commit to mantain testdrive (let's see)

Changed in testdrive:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.