tests: check optarg before refere it
tests: check optarg before refere it

zhaobob/libyami,01org/libyami,clearlylin/libyami,yizhouwei/libyami,dspmeng/libyami,seanvk/libyami,zhaobob/libyami,01org/libyami,andyLiuChina/libyami,chivakker/libyami,andyLiuChina/libyami,dspmeng/libyami,yizhouwei/libyami,uartie/libyami,halleyzhao/libyami,YuJiankang/libyami,BtbN/libyami,BtbN/libyami,YuJiankang/libyami,01org/libyami,clearlylin/libyami,dspmeng/libyami,uartie/libyami,stripes416/libyami,chivakker/libyami,lizhong1008/libyami,yizhouwei/libyami,BtbN/libyami,YuJiankang/libyami,zhaobob/libyami,stripes416/libyami,lizhong1008/libyami,halleyzhao/libyami,stripes416/libyami,halleyzhao/libyami,seanvk/libyami,andyLiuChina/libyami,BtbN/libyami,uartie/libyami,chivakker/libyami,andyLiuChina/libyami,lizhong1008/libyami,halleyzhao/libyami,clearlylin/libyami,seanvk/libyami