[PATCH] selftests/livepatch: fix and refactor new dmesg message code