[GHC] #16042: T13031 doesn't get run

#16042: T13031 doesn't get run -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Simon wrote noting that two tests in `stranal/should_compile` didn't appear to be run in his testing. I have been able to reproduce this. A few observations: * There is a `setTestOpts( only_ways(['optasm']) )` at the top of `stranal/should_compile/test.T` * in a `validate` build `T13031` is skipped when run with: * `make test TEST=T13031 WAY=normal` * `make test TEST=T13031 WAY=optasm` * `make slowtest TEST=T13031 WAY=normal` * `make slowtest TEST=T13031 WAY=optasm` * When the `setTestOpts` call is commented out `T13031` is * skipped with `make test TEST=T13031 WAY=optasm` * run with `make test TEST=T13031 WAY=normal` * `optasm` is in the `config.run_ways` list I suspect what is happening here is that the `optasm` way is not being run To be continued... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16042 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16042: T13031 doesn't get run -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): I see the problem. In `test_common_work` we have, {{{ def test_common_work(watcher, name, opts, func, args): try: t.total_tests += 1 setLocalTestOpts(opts) package_conf_cache_file_start_timestamp = get_package_cache_timestamp() # All the ways we might run this test if func == compile or func == multimod_compile: all_ways = config.compile_ways elif func == compile_and_run or func == multimod_compile_and_run: all_ways = config.run_ways elif func == ghci_script: if 'ghci' in config.run_ways: all_ways = ['ghci'] else: all_ways = [] else: all_ways = ['normal'] ... }}} and we then look at `all_ways` to determine whether the test is supposed to run. When I call `make slowtest TEST=T13031 WAY=optasm` I find that `all_ways` is `['normal']` yet `getTestOpts().only_ways` is `['optasm']`. Consequently I suspect the problem here is that `T13031` is hits the `else` case of the `if`, being a `run_command` test. The simplest fix for this would be to simply drop the `only_way` modifier on the test. However, I worry that issue this will inevitably recur elsewhere. I'm going to sleep on it to see what we can do to improve this situation. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16042#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16042: T13031 doesn't get run -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by osa1): There's another problem in `test_common_work`: if I define a `run_command` test with `only_ways(['optasm'])` my test will never run, because `if func == ...` always sets `all_ways = ['normal']` when `func` is `run_command`. I wonder if we have any tests that never run because of this.. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16042#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16042: T13031 doesn't get run -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by alpmestan): * cc: alpmestan (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16042#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC