[PATCH v5 11/13] lib: add support for device generic type in test_hmm