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