secp256k1_ecdh and secp256k1_ellswift_xdh check whether hashfp is one of the library's own hash functions and, if it is, call an internal version that uses the context's SHA256 (#1777, #1900). So secp256k1_ecdh_hash_function_sha256, secp256k1_ellswift_xdh_hash_function_bip324 and secp256k1_ellswift_xdh_hash_function_prefix themselves only run when user code calls them directly, and no test does that. Making all three return 0 without hashing still passes the tests.
This calls each of them from a small custom hash function and checks the result against the expected values the tests already use. For the prefix function, the test uses the BIP324 prefix described in the header, so the BIP324 vectors apply to it as well.