q2c: Convert test to Autotest framework.