188 qSize = qSize * modeSize;
194 "Verify that we can actually set the attribute MaxSize");
216 "There should be no packets in there");
220 "There should be one packet in there");
224 "There should be two packets in there");
233 "There should be eight packets in there");
237 item = queue->Dequeue();
241 "There should be seven packets in there");
244 item = queue->Dequeue();
248 "There should be six packet in there");
251 "Was this the second packet ?");
253 item = queue->Dequeue();
257 "There should be five packets in there");
260 item = queue->Dequeue();
261 item = queue->Dequeue();
262 item = queue->Dequeue();
263 item = queue->Dequeue();
264 item = queue->Dequeue();
266 item = queue->Dequeue();
277 "Verify that we can actually set the attribute MaxSize");
280 "Verify that we can actually set the attribute Tupdate");
283 "Verify that we can actually set the attribute DequeueThreshold");
285 queue->SetAttributeFailSafe(
"QueueDelayReference",
TimeValue(
Seconds(0.02))),
287 "Verify that we can actually set the attribute QueueDelayReference");
290 "Verify that we can actually set the attribute MaxBurstAllowance");
301 "There should be zero forced drops");
310 "Verify that we can actually set the attribute MaxSize");
313 "Verify that we can actually set the attribute Tupdate");
316 "Verify that we can actually set the attribute DequeueThreshold");
318 queue->SetAttributeFailSafe(
"QueueDelayReference",
TimeValue(
Seconds(0.08))),
320 "Verify that we can actually set the attribute QueueDelayReference");
323 "Verify that we can actually set the attribute MaxBurstAllowance");
329 st = queue->GetStats();
334 "There should be zero forced drops");
343 "Verify that we can actually set the attribute MaxSize");
346 "Verify that we can actually set the attribute Tupdate");
349 "Verify that we can actually set the attribute DequeueThreshold");
351 queue->SetAttributeFailSafe(
"QueueDelayReference",
TimeValue(
Seconds(0.02))),
353 "Verify that we can actually set the attribute QueueDelayReference");
356 "Verify that we can actually set the attribute MaxBurstAllowance");
362 st = queue->GetStats();
367 "There should be zero forced drops");
376 "Verify that we can actually set the attribute MaxSize");
379 "Verify that we can actually set the attribute Tupdate");
382 "Verify that we can actually set the attribute DequeueThreshold");
384 queue->SetAttributeFailSafe(
"QueueDelayReference",
TimeValue(
Seconds(0.02))),
386 "Verify that we can actually set the attribute QueueDelayReference");
389 "Verify that we can actually set the attribute MaxBurstAllowance");
395 st = queue->GetStats();
400 "There should be zero forced drops");
409 "Verify that we can actually set the attribute MaxSize");
411 queue->SetAttributeFailSafe(
"UseDequeueRateEstimator",
BooleanValue(
true)),
413 "Verify that we can actually set the attribute UseTimestamp");
419 st = queue->GetStats();
424 "There should be zero forced drops");
433 "Verify that we can actually set the attribute MaxSize");
436 "Verify that we can actually set the attribute UseCapDropAdjustment");
438 testAttributes->m_checkProb =
true;
443 st = queue->GetStats();
448 "There should be zero forced drops");
451 "Maximum increase in drop probability should be greater than 0.02");
460 "Verify that we can actually set the attribute MaxSize");
463 "Verify that we can actually set the attribute UseCapDropAdjustment");
465 testAttributes->m_checkProb =
true;
470 st = queue->GetStats();
475 "There should be zero forced drops");
477 testAttributes->m_maxDropProbDiff,
479 "Maximum increase in drop probability should be less than or equal to 0.02");
488 "Verify that we can actually set the attribute MaxSize");
491 "Verify that we can actually set the attribute UseEcn");
494 "Verify that we can actually set the attribute MarkEcnThreshold");
500 st = queue->GetStats();
505 "There should be some unforced drops");
508 "There should be zero forced drops");
517 "Verify that we can actually set the attribute MaxSize");
520 "Verify that we can actually set the attribute UseEcn");
523 "Verify that we can actually set the attribute MarkEcnThreshold");
525 testAttributes->m_ecnCapable =
true;
530 st = queue->GetStats();
535 "There should be some unforced drops");
538 "There should be zero forced drops");
547 "Verify that we can actually set the attribute MaxSize");
550 "Verify that we can actually set the attribute UseEcn");
553 "Verify that we can actually set the attribute MarkEcnThreshold");
555 testAttributes->m_ecnCapable =
true;
556 testAttributes->m_checkProb =
true;
561 st = queue->GetStats();
568 "There should be some unforced drops");
572 "Maximum Drop probability should be greater than 0.3");
575 "There should be zero forced drops");
584 "Verify that we can actually set the attribute MaxSize");
587 "Verify that we can actually set the attribute UseDerandomization");
589 testAttributes->m_checkAccuProb =
true;
594 st = queue->GetStats();
599 "There should be zero forced drops");
602 "There should not be any error in setting accuProb");
611 "Verify that we can actually set the attribute MaxSize");
614 "Verify that we can actually set the attribute UseDerandomization");
616 testAttributes->m_constAccuProb =
true;
619 testAttributes->m_setAccuProb = -0.16;
624 st = queue->GetStats();
629 "There should be zero forced drops");
638 "Verify that we can actually set the attribute MaxSize");
641 "Verify that we can actually set the attribute MaxBurstAllowance");
644 "Verify that we can actually set the attribute UseDerandomization");
646 testAttributes->m_constAccuProb =
true;
647 testAttributes->m_checkMaxAccuProb =
true;
650 testAttributes->m_setAccuProb = 8.6;
655 st = queue->GetStats();
659 testAttributes->m_expectedDrops,
660 "The number of unforced drops should be equal to number of expected unforced drops");
663 "There should be zero forced drops");
678 st = queue->GetStats();
683 "There should be zero marks");
698 st = queue->GetStats();
703 "There should be zero marks");