tests: also robustize `search_tests.sh`

Signed-off-by: Jean Privat <jean@pryen.org>