dh_test: proper masking