For this specific test file, I could fix the problem with this patch, if you and Dmitry are OK with it.
diff --git i/test/automated/elisp-mode-tests.el w/test/automated/elisp-mode-tests.el
index 1085b54..38c0b3b 100644
--- i/test/automated/elisp-mode-tests.el
+++ w/test/automated/elisp-mode-tests.el
@@ -209,6 +209,7 @@ xref-elisp-deftest
(debug (symbolp "name")))
`(ert-deftest ,(intern (concat "xref-elisp-test-" (symbol-name name))) ()
- (xref-elisp-test-run ,computed-xrefs ,expected-xrefs)
- ))
+ (let ((find-file-suppress-same-file-warnings t))
+ (xref-elisp-test-run ,computed-xrefs ,expected-xrefs)
+ )))
;; When tests are run from the Makefile, 'default-directory' is $HOME,