cmake_test: minor bug fixes