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