dexts: use a protocol for Select and Match
test: use on_exit instead of the deprecated teardown