DEBUG global config, add lots of test functions

Signed-off-by: eggfly <lihaohua90@gmail.com>