[PATCH] Factor out useful test case infrastructure from t/t6001... into t/t6000-lib.sh