• Steven Rostedt (Red Hat)'s avatar
    ktest: Allow tests to undefine default options · 22c37a9a
    Steven Rostedt (Red Hat) authored
    Tests can set options that override the default ones. But if a test
    tries to undefine a default option, it is simply ignored and the
    default option stays as is.
    
    For example, if you want to have a test that defines no MIN_CONFIG
    then the test should be able to do that with:
    
       TEST_START
       MIN_CONFIG =
    
    Which should make MIN_CONFIG not defined for that test. But the way
    the code currently works, undefined options in tests are dropped.
    This is because the NULL options are evaluated during the reading of
    the config file and since one can disable default options in the default
    section with this method, it is evaluated there (the option turns to a
    undef). But undef options in the test section mean to use the default
    option.
    
    To fix this, keep the empty string in the option during the reading
    of the config file, and then evaluate it when running the test. This
    will allow tests to null out default options.
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    22c37a9a
ktest.pl 91.9 KB