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

GHC ghc-devs at haskell.org
Thu Dec 13 04:56:36 UTC 2018


#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


More information about the ghc-tickets mailing list