removing globals from test programs

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>