diff --git a/testsuite/tests/ghc-e/should_fail/all.T b/testsuite/tests/ghc-e/should_fail/all.T
index cbdcd19f994df57f0eb5cbf1d1e1fa297418ecfa..7d86586246cf6e7ef69b4567dbea8e7f28ef3cf9 100644
--- a/testsuite/tests/ghc-e/should_fail/all.T
+++ b/testsuite/tests/ghc-e/should_fail/all.T
@@ -15,7 +15,7 @@ test('ghc-e-fail2', req_interp, makefile_test, ['ghc-e-fail2'])
 test('T9930fail',
      [extra_files(['T9930']),
       when(opsys('mingw32'), skip),
-      normalise_version('ghc'),
+      normalise_errmsg_fun(lambda s: normalise_version_("ghc")(s).replace('ghc-<VERSION>-<HASH>','ghc')),
       # broken for JS until cross-compilers become stage2 compilers (#19174)
       # or until we bootstrap with a 9.10 compiler
       js_broken(19174)],