Welcome to the QA Tech-Tips blog!

Some see things as they are, and ask "Why?"   I dream things that never were, and ask "Why Not".  
Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.  
Old Chinese Proverb

Sunday, April 29, 2012

You Can't Get There From Here! (Part 2)
Issues with the new AHCI interface

In a previous article, I talked about the advantages of the new AHCI interface.  It's fast and it supports a whole host of useful features.  Things like the ability to dismount and remove/swap a drive, as well as a lot of the newer features that have been built into modern hard drives.

Especially the "dismount and remove" feature - which makes swapping a SATA/eSATA drive as simple as swapping a USB thumb-drive.  If you are like me and you have multiple external SATA drive docks that you use to plug in a hard drive, use it for something as if it were a GIGANTIC USB thumb drive, and then remove it; AHCI is an absolute necessity.

Given your choice, AHCI is indeed the way to go.

However, there is a "dark side" to The Force:  A lot of software that needs to talk directly to the drives won't work with the new AHCI interface protocol.  The classic symptom of this incompatibility is that the software cannot find the hard drives or optical media devices on your system.

For example, my long-time-favorite CD/DVD/etc. burner software - CDBurner XP - has significant issues with the AHCI interface.  Likewise other CD burning software, True Burner is a good example, won't work with AHCI.

If you have hard-drive imaging software that is more than a couple of years old, it's pretty much a lead-pipe-cinch that it won't work with AHCI either.

If you have some older rescue disks laying around, such as BartPE disks, or even older versions of Linux - like the earlier versions of Knoppix - they have trouble with the AHCI interface protocol as well.

"Why is this so?" you may ask.  And yes, that is a very good question.

The answer is this:

As hard drive interfaces have evolved in the past; from the custom and non-standard embedded interfaces used in ancient computers, to the Western Digital interface for MFM and RLL drives used in computers only slightly less ancient, to the venerable IDE / EIDE / Ultra ATA interface used for so long, to the new SATA/eSATA interface - each major advance in the drive controller interface has obsoleted - and orphaned - the previous protocols and standards.

The AHCI interface - developed by Intel during the Itanium days - was designed to provide a whole host of useful, and needed, features to the hard drive community.  When SATA came around, the SATA standards leveraged the capabilities of the AHCI interface protocol - and the hard drive manufacturers jumped on the bandwagon and made sure that their drives would support these new standards.

The rock in the road here is that the design for the IDE/ATA interface never imagined any of these capabilities - drive swapping for example - because these features were just not possible with the older ATA. (PATA), drives.

However!  (# 1)

Most of the software available at that time - including operating systems - did not support the AHCI interface protocol.  So, the computer motherboard and BIOS manufacturers worked around this issue by providing a choice:  You can set the computer's motherboard to use the older - and more "compatible" IDE protocol, or the newer AHCI protocol.  As a result, the IDE protocol has stayed around, a relic of days-gone-by.

However!  (# 2)

Newer motherboards - and especially newer laptops - have decided to do away with the, (relatively), old and crufty IDE interface choice - leaving room in the BIOS for more interesting features.

As you have probably already noticed, the intersection of "However #1" and "However #2" results in things just not working - or working in bizarre ways.

To make matters even more interesting - you cannot just switch from one interface protocol to the other willy-nilly.  Doing so on a Windows based machine is the fast track to a machine that won't boot. (See this Microsoft site for an explanation why, and the registry hack needed to fix it.)

There are two big take-aways from all of this:
  • Software that relies on direct, low-level access to a drive may not work in the AHCI mode.
    So, if a software title you've used for years and years suddenly decides to stop working, or stop working on a new machine, check the AHCI mode setting in your BIOS.

  • When you find something like this, do not hesitate to ask the author(s) of this software product to update their software's drivers to support AHCI.

What say ye?

Jim (JR)

Monday, April 2, 2012

QA Engineer Downtime
 FlightGear 2.6

Just in case you were wondering what Software QA people do when they're not testing code. . . .  They go home and test code!

Today's topic is about yet another program you may want to "test" - FlightGear.  FlightGear is an Open Source flight simulation package that has been under active development since the mid to late '90's.  You can download it for free, and it has terrain and detail maps for (as far as I can tell) the entire globe.

One of the things I've been passionate about since - well - I can't remember back that far, has been airplanes and flying.  A Pilot's license, (and an airplane to go with it), has been a dream of mine for ages.

Of course, with 20/400 vision (uncorrected), corrected vision that requires lenses whose thickness is measured in centimeters - even with "High-E" plastic - and is good enough to let me drive, but not much else. . . .  the chances of passing the medical to get said Pilot's license is slim to zero, to say the least!

So, I have to assuage my frustrated dreams with flight simulation programs - the de facto standard being Microsoft's Flight Simulator in all it's versions.

Microsoft's Flight Simulator - all the way up to the latest version which is Flight Simulator "X" - is a truly worthy program for those who enjoy the exhilaration of flight.  It's fairly simple, you install the software, plug in your joystick/yoke and rudder pedals, (if you are lucky enough to have a set), hop in the virtual plane, and start flying!

Using the default "as installed" settings, your plane is refueled, your trusty valet-cum-ground engineer has already done the pre-flight checks, the engine is started and all warmed up, so all you have to do is release the brakes, advance the throttle a bit, and you're soon in the air.  And, unless you tell it to be extra picky, you always start on a day that has wonderful weather, a few scattered clouds, no wind to speak of, and inexhaustible fuel.

Microsoft's slogan for most of their Flight Simulator packages is something like it being "As Real As It Gets!"  Needless to say, flying in MS Flight Sim is - almost - trivially easy.  With a little practice and patience you can even get back on the ground in one piece!

Which left me wondering. . . .  Is flying an airplane REALLY that easy?

Answer:  No.

Microsoft Flight Simulator is - above all - a "game".  A very sophisticated game nonetheless, but still a game.  You can advance the "reality" settings from the default of "fantasy" to "somewhat realistic" - but it's still a game. Microsoft goes to great lengths not to frustrate those people who planked down $60+ for this beast, and they do so at the expense of realism.

On the other hand, FlightGear is most definitely NOT a "game" by any stretch of the imagination.  The stated design goal, (make that read "long-term design goal"), is to make a sim that is accurate enough to be FAA certified.  And they mean it.

Once you load and start the sim - and if you are at all smart about your selection of which plane to fly - you are somewhere outside of San Francisco in a seldom used municipal airport dedicated to small planes, sitting in a Cessna 172.  Said Cessna being one of the "easier" planes to fly.

And unlike Microsoft's Flight Simulator, there is no trusty valet to set things up for you.  YOU have to do the work.  You have to do the pre-flight.  You have to file the flight-plan, and yes YOU are expected to actually fly the airplane.

The program launches, you're sitting in "the Left-Hand Seat", (Pilot In Command), and there is no noise whatsoever.  Not even crickets.

Thinking that the sound support is still a little squiffy, I proceed to release the parking brake and advance the throttle.  Nothing.  I can see the controls move but nothing happens.  I try several other things, and still nothing is happening.  Is the game frozen?  Is it "paused"?  I decide to take another look at the "quick start" guide to see what I am doing wrong.

Guess what!  The absence of sound is deliberate - the engine is not running yet.

So, you look up the "engine start" check-list, (yes, there are check-lists for everything, just like in a real airplane), and proceed to do the drill:  Check and set the magnetos, set throttle and mixture controls, verify proper control action by looking at the wings, elevators, and tail.  And!  Especially if you have "random stuff happening" set, you do actually have to make sure that there isn't some clod near the airplane when you start the prop spinning.

So you flip the magneto switch to "start" and you hear the engine crank.  And crank.  And crank.  And crank.

Seriously, the first time I tried to start that beast I did not simulate starting the engine, but I did simulate running the battery down.

Reset simulation.

OK, lets look at that checklist again.  Hmm.  Looks OK to me.  So back to the manual!  It turns out that in order to get a REAL Cessna 172 started, you have to put both the mixture and throttle controls in certain very specific positions.  And it takes a few tries to get the hang of it.  Eventually. . . . you learn how to start the plane without killing the battery.

Ready for takeoff!  Release the brakes, advance the throttle and down the runway you go!  You pull back on the stick and. . . .  nothing.  You're about three feet in the air, wheels bouncing around as you swish this way and that way all over the grassy countryside surrounding the airport.  And yes, those odd looking structures up ahead, (that you are about fifteen seconds from crashing into), are high tension electric wire towers.

Eventually you come to a stop, assuming you avoid the high-tension towers, and wonder what went wrong.

Reset simulation, (for the upteenth time), and it's back to the manual!

In real life, (and in FlightGear), you have to be much more careful about trying to take off.  You need to have the correct amount of flaps set.  You have to have enough engine speed, (check the throttle and mixture again!), and you have to manage to get to your airplane's realistically rated "rotation velocity" before you can get off the ground.  Again, as in real life, you have to get it right.  "Almost" right isn't going to cut it.

And so on.

Now, I don't want you to think they have just tossed you to the wolves.  There are a lot of excellent tutorials about all kinds of things, from actually getting the plane to start, to flying a REAL IFR (Instrument Flight Rules) departure and approach, all the way to learning how to do everything the right way from the beginning.

The key words here being "the right way".  As far as I can tell, (based on the short time I spent with it, as well as reading the documentation), this piece of software strives for absolute, uncompromising, realism.  Though they do make apologies for certain inaccuracies.  Things like "Helicopter blades do not shatter if you have the tips exceed the speed of sound", or "we don't have access to real ground or air-traffic-control simulations yet".

However most of it is right on the money - from the yucky weather outside all the way to the positioning of the moon and constellations.  All of this stuff is derived - whenever possible - from real NOAA or GeoSAT weather, Naval Observatory data - even the precession of your inertial gyro is modeled down to the hairs on a flea.  And yes, you have to reset the Inertial system periodically.  Just like in real life.  And when doing your approach in lousy weather, you have to do your "procedure turns" and listen for the nav-aid beacons, just like in real life.

So, what does this have to do with QA, besides seeming to cater to the masochistic streak that every software QA Engineer has to have?

Though very realistic - in the ways that it can be realistic - there is still much room for improvement.  Testing, of both the stable releases as well as the development builds is an important contribution.  Even helping to clean up the documentation is welcomed with open arms.

It's also interesting - especially if you want to see what a REAL simulation is like!

Go check it out!  http://www.flightgear.org

What say ye?

Jim (JR)