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