Refine and add test cases

Refine walk_oid() and add test cases of collect_showdata_param()