[PATCH v2 2/2] selftest/vm: Add util.h and and move helper functions there