Thursday, October 10, 2013

Installing and debugging VirtualBox Guest Additions for Linux (Ubuntu 12.10 64-bit) on a Mac OSX 10.8.5 host

I wanted to install the VirtualBox Guest Additions for Ubuntu 12.10 64-bit on Mac OSX 10.8.5 (I'm using VirtualBox 4.2.18 r88780).
However, after clicking on Devices -> Install Guest Additions... (which mounts a CD image on the VM) and following the installation I noticed that it complained about the kernel headers being missing.
"The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!
".

Looking at /var/log/vboxadd-install.log showed this:
"/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop."


After reading this web page:
http://superuser.com/questions/499059/unable-to-install-virtualbox-specify-kern-dir-directory-installing-vir

I run the following:
$ sudo apt-get update

$ apt-cache search linux-headers-$(uname -r)
linux-headers-3.8.0-30-generic - Linux kernel headers for version 3.8.0 on 64 bit x86 SMP

$ sudo apt-get install linux-headers-$(uname -r)
After that, the update package UI prompted me to install some more updates.
After that, I got prompted to restart the VM which I did.

NOE: Later in the post you will see that it did not go as expected. Perhaps the installation of the headers failed but I got distracted with the UI prompt.

When I rebooted I noticed that I was about to run out of space; I needed to resize the harddrive of the VM.
I found this question/answer and I run this to make my vdi file be 20GBs instead of 8GBs:
$ VBoxManage modifyhd ~/VirtualBox\ VMs/Ubuntu\ 12.10\ 64-bit/Ubuntu\ 12.10\ 64-bit.vdi --resize 20000
Then, I realized that making the vdi file bigger is not sufficient; you need to change the partitions. I read this post which lead me to do this:
  • I downloaded the GParted ISO - http://sourceforge.net/projects/gparted
  • I mount it and started the VM which booted into it (follow the steps from the referred blog post)
  • Here's a screenshot of GParted after resizing the partitions:

Once resized, it was not clear to me how to shut things down; so I did a hard stop of the VM.
I removed the GParted ISO through VirtualBox's GUI after the VM stopped and started the VM again.

The Guest Additions failed to install again as the VM still had a very small screen resolution and sharing folders with the host was not yet working. Trying to install them again failed in the same way as in the beginning of this post.

I re-tried running again the following:
sudo apt-get install linux-headers-$(uname -r)
and run the Guest Additions installation again.

This time it worked fine:
Building the main Guest Additions module ...done!
Perhaps the headers failed to install last time and I got distracted with the "new updates" GUI prompt.

I'm happy now with my VM :)

Tuesday, September 17, 2013

Running *hidden* Firefox for Android 4.2 x86 tests

As of last night, we're running *hidden* the first two sets of Android 4.2 x86 test jobs on every Gecko 27 tree on tbpl:
https://tbpl.mozilla.org/?jobname=Android 4.2 x86&rev=2520866d5874&showall=1
More sets will be added as we green the test suites on Cedar.
Image from http://en.wikipedia.org/wiki/File:Android-x86.png
Side topic, if you have an Android x86 or Armv6 device and want to test Firefox for it please give it a shot in https://play.google.com/store/apps/details?id=org.mozilla.firefox_beta&hl=en

Back to the topic, there are various aspects of the Android x86 testing which are different from the rest of our mobile automated testing, here's a brief list:

  • We don't run them on a device like a Tegra board or a Panda board
    • We run them on Linux 64-bit in-house machines (we can't use AWS)
    • No foopies involved
  • We run them under the Android emulator for the x86 architecture
  • We test on Android 4.2 rather than on Android 2.2 or 4.0
  • We run them in parallel: four emulator instances at most
  • An Android x86 job on tbpl is called a "set"
    • All Android x86 jobs will be grouped under "Sets" rather than per suite category grouping (e.g. reftest or mochitest)
    • A set can run test suites from any category (mix mochitests with reftests)
Here's how it looks on tbpl:







From a developer's perspective here's what you need to know:
  • The jobs are currently not running visibly on tbpl
  • Android x86 is on its way to become a tier-1 platform
  • You can borrow a releng machine to run the tests on them
    • You will be able to run it on your machine if this bug gets fixed
  • We're greening more suites on Cedar and we will add them to other tbpl development trees
  • We could potentially be adding another 7 to 11 sets in the next few weeks
  • The suites on each set are currently in-flux as we move suites from orange sets to green sets
  • Android x86 testing will ride the Gecko 27 trains


    In a following blog post I will go into the technical details on how these tests are run by mozharness.

    All of this work happened under bug 895186.

    If you want to contribute on how to make them easily runnable outside of a releng machine please visit this bug.


    After several months of development, big thanks (sorted alphabetically) to aki, Callek, dminor, gbrown, rail, RyanVM and ted.

    We still have some work to go but it is good to capture this small step towards victory.

    Upcoming:





    Creative Commons License
    This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

    Tuesday, July 30, 2013

    Enabling talos mozharness for FF25 development trees

    Today we have enabled talos mozharness (jyeo's blog post) on all FF25 development trees on tbpl.mozilla.org.
    This is a project that jyeo has completed during his internship at Mozilla's Release Engineering.
    Credit to jyeo
    What are the implications of this?

    • It reduces chaos.
      • You can run talos the same way as our infrastructure does to minimize differences
    • It makes contributions easier.
      • You can contribute to talos mozharness without having to install and setup Buildbot
    • It removes deployments.
      • We can deploy changes without having to wait on the buildbot masters to be reconfigured
        • This makes specially the A-team very happy
      • The A-team does not have to create talos.zip files
        • The A-team does not have to wait on us to upload the talos.zip
        • Developers don't need to request or create a talos.zip since we use the talos repo directly
    • It makes easier developing and testing new talos changes.
      • We can make configuration changes in an easier manner and it is locked to a given changest rather than affecting a whole branch
        • It can ride the trains
        • It only requires changes to talos.json
        • This makes testing new configuration changes on try easier
      • Mozharness also gives us a lot of flexibility
        • Including a finer control on the usage of Python packages
    • We even have mach support!
      • This makes it trivial for developers to run talos in their beloved objdirs (blog post)


    Cons:




    Creative Commons License
    This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.