diff --git a/cabal-testsuite/PackageTests/MultipleLibraries/Successful/cabal.out b/cabal-testsuite/PackageTests/MultipleLibraries/Successful/cabal.out
index d40e62c30a24bfb42d944f72b353801861465382..71c776d0232145a36f81e4f7fb499ab761dea740 100644
--- a/cabal-testsuite/PackageTests/MultipleLibraries/Successful/cabal.out
+++ b/cabal-testsuite/PackageTests/MultipleLibraries/Successful/cabal.out
@@ -4,7 +4,7 @@ Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
  - pkg-def-0.1.0.0 (lib:publib) (first run)
  - pkg-abc-0.1.0.0 (exe:program) (first run)
-Warning: pkg-def.cabal:13:27: visibility is experimental feature (issue #5660)
+Warning: pkg-def.cabal:10:27: visibility is experimental feature (issue #5660)
 Configuring library 'publib' for pkg-def-0.1.0.0..
 Preprocessing library 'publib' for pkg-def-0.1.0.0..
 Building library 'publib' for pkg-def-0.1.0.0..
diff --git a/cabal-testsuite/PackageTests/MultipleLibraries/Successful/pkg-def/pkg-def.cabal b/cabal-testsuite/PackageTests/MultipleLibraries/Successful/pkg-def/pkg-def.cabal
index a4d95cf4a01d1d7f87fa9455571a296c967d4bf7..8e12690eb5124d9612c4c7f847d956d1015d2833 100644
--- a/cabal-testsuite/PackageTests/MultipleLibraries/Successful/pkg-def/pkg-def.cabal
+++ b/cabal-testsuite/PackageTests/MultipleLibraries/Successful/pkg-def/pkg-def.cabal
@@ -2,11 +2,8 @@ cabal-version: 3.0
 name:          pkg-def
 version:       0.1.0.0
 
-library
-  default-language: Haskell2010
-  hs-source-dirs:   src
-  build-depends:    base
-  exposed-modules:  PkgDef
+-- there was public library. But we shouldn't need one.
+-- https://github.com/haskell/cabal/issues/6038
 
 library publib
   default-language: Haskell2010