File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,5 +57,9 @@ int main(int argc, char *argv[])
5757 printf ("time %.2fs\n" , secs );
5858 printf ("speed %ldk/s\n" , (long )(naddr / secs ) / 1000 );
5959
60+ if (target_gen_progress () <= 0.999f ) {
61+ printf ("DID NOT FINISH?!\n" );
62+ return 1 ;
63+ }
6064 return 0 ;
6165}
Original file line number Diff line number Diff line change @@ -401,8 +401,9 @@ static void fill_cache(void)
401401 iter_min = (targets_last_i + 1 ) % targets_i ;
402402 do {
403403 const unsigned int iter_max = unfinished_max ;
404- // update unfinished_max along the way, for the next iteration
405- unfinished_max = 0 ;
404+ // update unfinished_max along the way, for the next iteration.
405+ // take the targets we haven't looked at into account when iterating partially.
406+ unfinished_max = iter_min ;
406407 assert (iter_min < iter_max );
407408 for (unsigned int i = iter_min ; i < iter_max ; i ++ ) {
408409 if (targets [i ].done )
@@ -423,6 +424,12 @@ static void fill_cache(void)
423424 }
424425 iter_min = 0 ;
425426 } while (unfinished_max > 0 );
427+
428+ // if we get here, we must be done
429+ for (unsigned int i = 0 ; i < targets_i ; i ++ ) {
430+ assert (targets [i ].done );
431+ assert (targets [i ].delayed_start == 0 );
432+ }
426433}
427434
428435static inline uint64_t read_be64 (const void * ptr )
Original file line number Diff line number Diff line change @@ -112,6 +112,22 @@ done
112112
113113# #
114114
115+ # differing sizes and bigger than the internal buffer
116+ printf ' %s\n' > in.txt \
117+ f00::x f01::xx f02::xxx f03::xxxx
118+
119+ for opt in 1 0; do
120+
121+ notee=1 try --randomize-hosts $opt --print-hosts @in.txt
122+ check_out " ^f00::2"
123+ check_out " ^f01::24"
124+ check_out " ^f02::246"
125+ check_out " ^f03::2468"
126+
127+ done
128+
129+ # #
130+
115131try --icmp 3ffe::/48
116132check_out " tremendous amount of time"
117133
You can’t perform that action at this time.
0 commit comments