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