bad command-line options hang test cases

Bug #570948 reported by Jay Pipes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Patrick Crews
7.0
Fix Released
Medium
Patrick Crews

Bug Description

If a bad command-line argument is placed into a test-master.opt file, the test case will hang instead of correctly returning from server startup with an error message.

For instance, assume a test case named tester.test, and its master.opt file, tester-master.opt, which contains:

--bad-command-line-arg=1

The test runner will hang, waiting for around 60 seconds before returning a cryptic message such as:

main.tester [ fail ]
drizzletest: Could not open connection 'default' after 500 attempts: 21 drizzle_state_connect:could not connect

Stopping All Servers
Restoring snapshot of databases
Resuming Tests

It is impossible to tell what the error is without then looking at the master.err file, which contains this:

CURRENT_TEST: main.tester
One can only use the --user switch if running as root
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins.
100427 23:52:43 InnoDB: highest supported file format is Barracuda.
100427 23:52:43 InnoDB Plugin 1.0.4 started; log sequence number 47789
/home/jpipes/repos/drizzle/subscriber-plugin/drizzled/.libs/lt-drizzled: unknown option '--bad-command-line-arg'Aborting
/home/jpipes/repos/drizzle/subscriber-plugin/drizzled/.libs/lt-drizzled: Shutdown complete
Error in my_thread_global_end(): 1 threads didn't exit

Note that there is an error in my_thread_global_end(), and that the startup process does not gracefully exit and report an error.

Related branches

Changed in drizzle:
assignee: nobody → Patrick Crews (patrick-crews)
Revision history for this message
Patrick Crews (patrick-crews) wrote :

24 Jan 2011 12:34:33 ERROR: Server failed to start within 60 seconds. This could be a problem with the test machine or the server itself
24 Jan 2011 12:34:33 WARNING: Problem starting server(s) for test...failing test case
24 Jan 2011 12:34:33 : auth_test.basic [ fail ]
24 Jan 2011 12:34:36 : ================================================================================
24 Jan 2011 12:34:36 INFO: Test execution complete
24 Jan 2011 12:34:36 INFO: Summary report:
24 Jan 2011 12:34:36 INFO: Executed 19/19 test cases, 100.00 percent
24 Jan 2011 12:34:36 INFO: STATUS: FAIL, 1/19 test cases, 5.26 percent executed
24 Jan 2011 12:34:36 INFO: STATUS: PASS, 18/19 test cases, 94.74 percent executed
24 Jan 2011 12:34:36 INFO: FAIL tests: auth_test.basic
24 Jan 2011 12:34:36 INFO: Test execution complete
24 Jan 2011 12:34:36 INFO: Stopping all running servers...

We now have code that detects if the server hasn't started in %timeout seconds - will cause the test case to fail without calling drizzletest if the server start is bad.

Changed in drizzle:
status: Confirmed → Fix Committed
milestone: none → future
Revision history for this message
Lee Bieber (kalebral-deactivatedaccount) wrote :

Fixed in new python based test runner

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.