def check_subscriber_output(c, client_id, target):
  """Compares the output of a TCP client with an expected string."""
  outc = c.get_output_timeout(1)
  if target not in outc:
    print("Error: C" + client_id + " output should contain [" + target + "], is actually [" + outc.rstrip() + "]")
    return False

  return True