add check in spec Signed-off-by: yangkunlin <yangkunlin7@huawei.com> (cherry picked from commit 60f8b1a2ae26d699f5146cca0d199ce8622279a4)