Changeset 2690


Ignore:
Timestamp:
Nov 15, 2011, 5:21:53 AM (3 years ago)
Author:
quozl
Message:

OLPC trac 11427 - test-all stopped working at the first device that had no reg property, caused by stack imbalance in most-tests premature exit paths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ofw/core/ofwcore.fth

    r2688 r2690  
    32793279 
    32803280: most-tests  ( -- exit? ) 
    3281    " selftest"  current-device  (search-wordlist)  if  ( xt ) 
    3282  
    3283       drop                                              (  ) 
     3281   " selftest"  current-device  (search-wordlist)  if   ( xt ) 
     3282 
     3283      drop                                              ( ) 
    32843284 
    32853285      \ We only want to execute the selftest routine if the device has 
     
    32873287      \ routines for "wildcard" devices like st and sd. 
    32883288 
    3289       " reg"  get-property  if  exit  then 2drop        ( ) 
     3289      " reg"  get-property  if  false exit  then 2drop  ( ) 
    32903290 
    32913291      \ We sometimes want to skip the testing of certain devices. 
    3292       current-device skip-test?  if  exit  then         ( ) 
     3292      current-device skip-test?  if  false exit  then   ( ) 
    32933293 
    32943294      ??cr ." Testing "  pwd 
     
    33183318; 
    33193319 
    3320 \ "action-acf" is executed for each device node in the subtree 
    3321 \ rooted at dev-addr,len , with current-device set to the 
    3322 \ node in question.  "action-acf" can perform arbitrary tests 
    3323 \ on the node to determine if that node is appropriate for 
    3324 \ the action that it wished to undertake. 
    3325  
    33263320: test-subtree  ( dev-addr,len -- ) 
    33273321   current-device >r                ( dev-addr,len r: phandle ) 
    3328    find-device                      ( r: phandle xt ) 
    3329    ['] most-tests  ['] (search-preorder)  catch  2drop  ( r: phandle xt ) 
     3322   find-device                      ( r: phandle ) 
     3323   ['] most-tests  ['] (search-preorder)  catch  2drop  ( r: phandle ) 
    33303324   r> push-device                   ( ) 
    33313325; 
Note: See TracChangeset for help on using the changeset viewer.