tests/pm_pc8: extract i2c_subtest_check_environment