tests: Speed up classifier test.
authorBen Pfaff <blp@nicira.com>
Wed, 26 May 2010 22:24:13 +0000 (15:24 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 26 May 2010 22:24:13 +0000 (15:24 -0700)
commit70d3fbe7658b59bac65f8b4f2ba03602acf7f1c2
treea1189e6c73707df32800765442a8563c45b3df9f
parent3223e977cae4125b24ebb9498e0b67b4d8fac4c3
tests: Speed up classifier test.

Many of the classifier tests take time exponential in the number of fields,
because the existing compare_classifiers() iterates over 2^n_fields
possibilities.  This is very slow.

This commit fixes the problem by only testing a fixed number of random
possibilities instead of all of them.  This makes it much, much faster.
tests/test-classifier.c