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