ami_testhooks.c automatically registers hook