Things like "tests"

Alan DeKok aland at deployingradius.com
Fri Apr 12 20:37:43 CEST 2013


  I'm happy to announce that there are more of the things called "tests"
for the server.

  I've broken out the new condition and xlat parsing into a simple test
harness.  See src/tests/condition.txt and src/tests/xlat.txt

  Writing the tests highlighted a few minor bugs in both the conditions
and xlat code.  Those are now fixed.

  As always, more testing is appreciated.

  I think the next step is to integration the parsing into "unlang".
The code right now is "awkward", to be polite.  This would also allow
start-time errors for xlat's.  i.e.:

	if (User-Name == "%{foo: bar}") {

  would result in an error of "unknown module foo".

  The parsed conditions also make the "unlang" interpreter simpler and
faster.  Many more things can be compiled once, and interpreted at run
time.  The code in 2.x re-parses the strings.  Every.  Single.  Time.

  I still don't want "unlang" to become a real language.  However,
having cleaner code, a better parser, and better error messages is all good.

  Alan DeKok.


More information about the Freeradius-Devel mailing list