[PATCH v2 01/11] test: Correctly match "background" with "wait" commands