[tor-bugs] #8330 [Ooni]: ooni: NetTestCase.checkRequiredOptions() does not parse conditionals

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Feb 24 21:16:48 UTC 2013


#8330: ooni: NetTestCase.checkRequiredOptions() does not parse conditionals
-----------------------------+----------------------------------------------
 Reporter:  isis             |          Owner:  hellais
     Type:  defect           |         Status:  new    
 Priority:  normal           |      Milestone:         
Component:  Ooni             |        Version:         
 Keywords:  ooni, bugreport  |         Parent:         
   Points:                   |   Actualpoints:         
-----------------------------+----------------------------------------------
 if i do:

 {{{
 class FooTestCase(nettest.NetTestCase):
     checkRequiredOptions = ['dstip', 'port']
 }}}

 everything works just fine, because checkRequiredOptions() expects a list
 of things that are expected, and if anything is missing then it doesn't
 run FooTestCase.

 However, what if I wanted to do:

 {{{
 class FooTestCase(nettest.NetTestCase):
     checkRequiredOptions =  ( 'dstip' & 'port' ) || 'file'
 }}}

 Obviously, doesn't work. But it should, because there are now several
 tests which essentially have their own smarter versions of
 checkRequiredOptions(), including dnsconsistency and echo.

 In the newer (as of right now unmerged) feature/task-manager* branches,
 either NetTestCase.checkRequiredOptions() or NetTestLoader.checkOptions()
 should support conditional options (the latter has a call to the former).

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8330>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list