Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property test failure (possibly Wasm-related?) #1198

Open
dhess opened this issue Jan 7, 2024 · 1 comment
Open

Property test failure (possibly Wasm-related?) #1198

dhess opened this issue Jan 7, 2024 · 1 comment
Assignees
Labels
blocked/need-info ❌ Blocked, need more information bug 🐞 A confirmed bug testing Related to tests/testing wasm WebAssembly

Comments

@dhess
Copy link
Member

dhess commented Jan 7, 2024

The Wasm test suite generated a property test failure. It's not clear yet whether this is Wasm-related:

multiple requests accepted:                   FAIL (47.53s)
--
  | ✗ multiple requests accepted failed at test/Tests/Action/Available.hs:507:42
  | after 257 tests, 18 shrinks and 811 discards.
  | shrink path: 257/811:aGeBgEbEiVbCa4Lh
  | AddTm                                   34% ██████▊·············
  | AddTy                                   26% █████▏··············
  | AvailAct                                73% ██████████████▌·····
  | Eval1                                   10% ██··················
  | EvalFull                                11% ██▏·················
  | Question                                 5% █···················
  | RenameModule                            12% ██▍·················
  | Undo                                    11% ██▏·················
  | Just (Input AddCon)                     12% ██▎·················
  | Just (Input MakeChar)                    0% ····················
  | Just (Input MakeCon)                     1% ▏···················
  | Just (Input MakeForall)                  1% ▏···················
  | Just (Input MakeLAM)                     3% ▌···················
  | Just (Input MakeLam)                     6% █▏··················
  | Just (Input MakeLet)                     1% ▏···················
  | Just (Input MakeLetRec)                  2% ▎···················
  | Just (Input MakeTCon)                    5% █···················
  | Just (Input MakeTVar)                    1% ▏···················
  | Just (Input MakeVar)                     2% ▍···················
  | Just (Input MakeVarSat)                  1% ▏···················
  | Just (Input RenameCon)                   2% ▍···················
  | Just (Input RenameDef)                   2% ▍···················
  | Just (Input RenameLam)                   1% ▏···················
  | Just (Input RenameLet)                   1% ▏···················
  | Just (Input RenameType)                 15% ███·················
  | Just (Input RenameTypeParam)             4% ▋···················
  | Just (NoInput AddConField)               5% █···················
  | Just (NoInput DeleteCon)                 3% ▌···················
  | Just (NoInput DeleteConField)            1% ▏···················
  | Just (NoInput DeleteDef)                 1% ▏···················
  | Just (NoInput DeleteExpr)                3% ▌···················
  | Just (NoInput DeleteKind)                6% █▏··················
  | Just (NoInput DeleteType)                8% █▌··················
  | Just (NoInput DeleteTypeDef)            11% ██▏·················
  | Just (NoInput DuplicateDef)              4% ▋···················
  | Just (NoInput EnterHole)                 0% ····················
  | Just (NoInput LetToRec)                  0% ····················
  | Just (NoInput MakeAPP)                   0% ····················
  | Just (NoInput MakeAnn)                   1% ▏···················
  | Just (NoInput MakeApp)                   2% ▍···················
  | Just (NoInput MakeCase)                  4% ▊···················
  | Just (NoInput MakeFun)                  12% ██▎·················
  | Just (NoInput MakeKFun)                  2% ▍···················
  | Just (NoInput MakeTApp)                  2% ▎···················
  | Just (NoInput Raise)                     4% ▊···················
  | Just (NoInput RaiseType)                 1% ▏···················
  | ignoring - capture                       0% ····················
  | ignoring - clash                         5% ▉···················
  | name-capture with entered name          10% ██··················
  | rename def name clash with entered name  2% ▎···················
  |  
  | ┏━━ test/Tests/Action/Available.hs ━━━
  | 327 ┃ tasty_multiple_requests_accepted :: Property
  | 328 ┃ tasty_multiple_requests_accepted = withTests 500
  | 329 ┃   $ withDiscards 2000
  | 330 ┃   $ propertyWT []
...
507 ┃     (Left err, _) -> annotateShow err >> failure
--
  | ┃     │ ActionError
  | ┃     │   (InternalFailure
  | ┃     │      "transformCaseBranches: scrutinees did not have a cached synthesised type")
  | ┃     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  | 508 ┃     (Right _, a'') -> ensureSHNormal a'' $> Succeed a''
  |  
  | ┏━━ test/Tests/Action/Available.hs ━━━
  | 679 ┃ toProgAction ::
  | 680 ┃   Monad m =>
  | 681 ┃   Level ->
  | 682 ┃   App ->
  | 683 ┃   ( Either (ASTTypeDef TypeMeta KindMeta) Def
  | 684 ┃   , Selection' ID
  | 685 ┃   , Maybe Available.Action
  | 686 ┃   ) ->
  | 687 ┃   PropertyT m PA
  | 688 ┃ toProgAction l a (def, loc, action) = do
  | 689 ┃   def' <- case (defAST <$> def, action) of
  | 690 ┃     (Left d, _) -> pure $ Left d
  | 691 ┃     (Right Nothing, Nothing) -> discard
  | 692 ┃     (Right Nothing, Just act) -> do
  | 693 ┃       annotate "Expected no action to be available on a primitive"
  | 694 ┃       annotateShow def
  | 695 ┃       annotateShow act
  | 696 ┃       failure
  | 697 ┃     (Right (Just d), _) -> pure $ Right d
  | 698 ┃   case action of
  | 699 ┃     Nothing -> discard
  | 700 ┃     Just action' -> case action' of
  | 701 ┃       Available.NoInput act' -> do
  | 702 ┃         progActs <-
  | 703 ┃           either (\e -> annotateShow e >> failure) pure
  | 704 ┃             $ toProgActionNoInput (map snd $ progAllDefs $ appProg a) def' loc act'
  | 705 ┃         pure $ NoOpt progActs
  | 706 ┃       Available.Input act' -> do
  | 707 ┃         Available.Options{Available.opts, Available.free} <-
  | 708 ┃           maybe (annotate "id not found" >> failure) pure
  | 709 ┃             $ Available.options
  | 710 ┃               (map snd $ progAllTypeDefs $ appProg a)
  | 711 ┃               (map snd $ progAllDefs $ appProg a)
  | 712 ┃               (progCxt $ appProg a)
  | 713 ┃               l
  | 714 ┃               def'
  | 715 ┃               loc
  | 716 ┃               act'
  | 717 ┃         let opts' = [Gen.element $ (OptOffered,) <$> opts \| not (null opts)]
  | 718 ┃         let opts'' =
  | 719 ┃               opts' <> case free of
  | 720 ┃                 Available.FreeNone -> []
  | 721 ┃                 Available.FreeVarName -> [(OptGen,) . (\t -> Available.Option t Nothing False) <$> (unName <$> genName)]
  | 722 ┃                 Available.FreeInt -> [(OptGen,) . (\t -> Available.Option t Nothing False) <$> (show <$> genInt)]
  | 723 ┃                 Available.FreeChar -> [(OptGen,) . (\t -> Available.Option t Nothing False) . T.singleton <$> genChar]
  | 724 ┃         case opts'' of
  | 725 ┃           [] -> pure NoOfferedOpts
  | 726 ┃           options -> do
  | 727 ┃             (mkPA, opt) <- forAllWithT (show . snd) $ Gen.choice options
  | ┃             │ Option {option = "x", context = Nothing, matchesType = False}
  | 728 ┃             progActs <- either (\e -> annotateShow e >> failure) pure $ toProgActionInput def' loc opt act'
  | 729 ┃             pure $ mkPA opt progActs
  |  
  | This failure can be reproduced by running:
  | > recheckAt (Seed 8950671910154333759 17555302804257829771) "257/811:aGeBgEbEiVbCa4Lh" multiple requests accepted
  |  
  | Use "--pattern '$NF ~ /multiple requests accepted/' --hedgehog-replay '257/811:aGeBgEbEiVbCa4Lh Seed 8950671910154333759 17555302804257829771'" to reproduce from the command-line.
  |  
  | Use -p '/multiple requests accepted/' to rerun this test only.

@dhess
Copy link
Member Author

dhess commented Jan 7, 2024

@dhess dhess self-assigned this Jan 7, 2024
@dhess dhess added bug 🐞 A confirmed bug testing Related to tests/testing blocked/need-info ❌ Blocked, need more information wasm WebAssembly labels Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/need-info ❌ Blocked, need more information bug 🐞 A confirmed bug testing Related to tests/testing wasm WebAssembly
Projects
None yet
Development

No branches or pull requests

1 participant