tests: Check for valid fd in test_res_init