Breaking Eggs And Making Omelettes

Topics On Multimedia Technology and Reverse Engineering


New FATE Database Format

November 23rd, 2008 by Multimedia Mike

First, I should announce that I finally fixed the the problem I introduced during last month’s big FATE rework in which the stdout/stderr blobs were not making it all the way into the MySQL database. I don’t know how that escaped notice during my initial testing. It works again, and after only 3 evenings of analysis and debugging.

Moving right along, I have also made good on my intention to move FATE’s test database format from a pickled Python blob to an SQLite database. You can download the current database of test specs at:

Run the file through bunzip2, install SQLite, either through your system’s package manager or from, and run:

  $ sqlite3 fate-tests.sqlite

Be sure to use ‘sqlite3’ vs. ‘sqlite’; the latter invokes v2 of the program.

First things first, study the schema:

  1. sqlite> .schema
  2. CREATE TABLE test_spec
  3.         (
  4.           id INTEGER,
  5.           short_name TEXT,
  6.           command TEXT,
  7.           description TEXT,
  8.           expected_status INTEGER,
  9.           expected_stdout TEXT,
  10.           timeout_seconds INTEGER,
  11.           active INTEGER
  12.         );

And then formulate queries. As an example, get a list of all the tests (short name and command) that are presently disabled:

  1. sqlite>
  2.   SELECT short_name, command
  3.   FROM test_spec
  4.   WHERE active=0;

You should find that the list matches up with the red boxes in the master FATE test list.

I hope some people find this useful.

Posted in FATE Server | Comments Off on New FATE Database Format

Comments are closed.