[PATCH v4 12/13] tools: update hmm-test to support device generic type