livepatch: Selftests of the API for tracking system state changes