Merge remote-tracking branch 'origin/master'

This commit is contained in:
Logan Lipke
2020-07-09 17:30:54 -07:00
21 changed files with 1811 additions and 0 deletions

View File

@@ -57,3 +57,9 @@ test configuration through the GUI.
Check /tmp/lf_reports for the report files.
The cicd and testbeds directories contain some code that came from another CICD implementation
Candela worked on. It is a good starting point, but will need modifications before it fully
works for your test bed.

104
gui/cicd/README.txt Normal file
View File

@@ -0,0 +1,104 @@
Potential polling method for CICD integration.
* Polling should decrease network security head-aches such as setting
up VPN access for all test beds.
***
Implementation:
* Web server accessible to all CICD test beds runs a 'test orchestrator' logic, henceforth TO
* This TO will periodically query jfrog for latest openwrt builds (see jfrog.pl)
* If new build is found, a work-item file containing pertinent info, including the HW platform
will be created, example:
CICD_TYPE=fast
CICD_RPT_NAME=ea8300
CICD_RPT_DIR=greearb@192.168.100.195:/var/www/html/myco/testbeds//ferndale-basic-01/reports
CICD_HW=ea8300
CICD_FILEDATE=
CICD_GITHASH=
CICD_URL=https://myco.jfrog.io/artifactory/wlan-ap-firmware/
CICD_FILE_NAME=ea8300
CICD_URL_DATE=24-Apr-2020 16:32
* TO has manually configured list of test-beds, with some info about each test
bed, including the DUT HW platform and testing capabilities.
* It picks a test bed that matches the new build HW.
* That test bed will have a URL directory for it and it alone.
* The TO writes a new test configuration file into this directory.
The test configuration file will have the info above, and also have other
info including the tests to run and where to upload results when complete.
* TO looks for any completed results, and removes the work-item if result is found.
* TO will re-calculate historical charts and publish those if new results are found for a testbed.
It could generate email and/or poke the results into testrails or similar at this point.
* TO should run periodically every 1 minute or so to check on progress.
* Test bed polling:
* The test-bed (hence forth TB) will poll its directory on the TO web server to look for new jobs.
* When new job is found, the TB will download the test config file, and use scp to upload a file
to the TO to indicate it is working on the test.
* When test is complete, TB will upload results to TO server. TO now knows test bed is available
for more jobs.
* TB should pause for 2 minutes after uploading results to make sure TO notices the new results and
removes the old work item so that TB does not re-test the same work item.
************* Installation / Usage ***************
The jfrog.pl runs on the web server. This is the Test Orchestrator.
Create a directory structure looking similar to this:
[greearb@ben-dt4 html]$ find myco -name "*" -print
myco
myco/testbeds
myco/testbeds/ferndale-basic-01
myco/testbeds/ferndale-basic-01/pending_work
myco/testbeds/ferndale-basic-01/reports
Copy the TESTBED_INFO from testbeds directory to the myco/testbeds directory:
[greearb@ben-dt4 testbeds]$ pwd
/var/www/html/myco/testbeds
cp -ar /home/greearb/git/lanforge-scripts/gui/cicd/ferndale-basic-01/ ./
Run the jfrog.pl script from the myco/testbeds directory:
/home/greearb/git/lanforge-scripts/gui/cicd/cicd/jfrog.pl --passwd secret --tb_url_base greearb@192.168.100.195:/var/www/html/myco/testbeds/
A work-item file will be created as needed, in my case, it is here:
[greearb@ben-dt4 testbeds]$ cat ferndale-basic-01/pending_work/fast/CICD_TEST-ea8300
CICD_TEST=fast
CICD_RPT_DIR=greearb@192.168.100.195:/var/www/html/myco/testbeds//ferndale-basic-01/reports/fast
CICD_RPT_NAME=ea8300
CICD_HW=ea8300
CICD_FILEDATE=
CICD_GITHASH=
CICD_URL=https://myco.jfrog.io/artifactory/wlan-ap-firmware/
CICD_FILE_NAME=ea8300
CICD_URL_DATE=24-Apr-2020 16:32
************ Installation / Usage on Test Controller **************
# This runs on the test controller or Jump-Box.
# Set up OS
sudo needs to work w/out password.
sudo chmod a+rwx /dev/ttyUSB*
sudo pip3 install pexpect-serial
Run testbed_poll.pl from the cicd testbed directory:
The 192.168.100.195 system is the jfrog / Orchestrator machine. The jfrog
password is so that it can download the OpenWrt binary file from jfrog.
cd ~/git/lanforge-scripts/gui/cicd/ferndale-basic-01
../testbed_poll.pl --jfrog_passwd secret --url http://192.168.100.195/myco/testbeds/testbed-ferndale-01/pending_work/

View File

@@ -0,0 +1,7 @@
TESTBED_HW=ea8300
# Controller's view of the test bed, from wlan-testing/cicd/[testbed] directory
TESTBED_DIR=../../testbeds/ferndale-basic-01
TESTBED_CASEID_FAST=C1308
TESTBED_CASEID_BASIC=C1309

379
gui/cicd/jfrog.pl Executable file
View File

@@ -0,0 +1,379 @@
#!/usr/bin/perl
# Query jfrog URL and get list of builds.
# This will be run on the test-bed orchestrator
# Run this in directory that contains the testbed_$hw/ directories
# Assumes cicd.class is found in ~/git/lanforge-scripts/gui/
use strict;
use warnings;
use Getopt::Long;
my $user = "cicd_user";
my $passwd = "";
my $url = "https://myco.jfrog.io/artifactory/wlan-ap-firmware";
my @platforms = ("ea8300", "ecw5410"); # Add more here as we have test beds that support them.
my $files_processed = "jfrog_files_processed.txt";
my $tb_url_base = "cicd_user\@myco.cicd.cloud.com/testbeds"; # Used by SSH: scp -R results_dir cicd_user@myco.cicd.cloud.com/testbeds/
my $help = 0;
my $cicd_prefix = "CICD_TEST";
my $kpi_dir = "/home/greearb/git/lanforge-scripts/gui/";
my @ttypes = ("fast", "basic");
my $duplicate_work = 1;
my $ul_host = "www";
my $ul_dir = "candela_html/examples/cicd/"; # used by scp
my $ul_dest = "$ul_host:$ul_dir"; # used by scp
my $other_ul_dest = ""; # used by scp
my $result_url_base = "http://localhost/myco/cicd";
my $usage = qq($0
[--user { jfrog user (default: cicd_user) }
[--passwd { jfrog password }
[--result_url_base { http://foo.com/myco/cicd }
[--url { jfrog URL, default is OpenWrt URL: https://myco.jfrog.io/artifactory/wlan-ap-firmware/ }
[--files_processed { text file containing file names we have already processed }
[--tb_url_base { Where to report the test results? }
Example:
# Use MY-CO jfrog repo
$0 --user cicd_user --passwd secret --url https://myco.jfrog.io/artifactory/wlan-ap-firmware/ \\
--files_processed jfrog_files_processed.txt \\
--tb_url_base cicd_user\@myco.cicd.cloud.com/testbeds
# Download images from candelatech.com web site (for developer testing and such)
$0 --tb_url_base greearb@192.168.100.195:/var/www/html/myco/testbeds/ \\
--url http://www.candelatech.com/downloads/myco/test_images
);
GetOptions
(
'user=s' => \$user,
'passwd=s' => \$passwd,
'url=s' => \$url,
'files_processed=s' => \$files_processed,
'tb_url_base=s' => \$tb_url_base,
'result_url_base=s' => \$result_url_base,
'help|?' => \$help,
) || (print($usage) && exit(1));
if ($help) {
print($usage) && exit(0);
}
#if ($passwd eq "") {
# print("ERROR: You must specify jfrog password.\n");
# exit(1);
#}
my $i;
my $pwd = `pwd`;
chomp($pwd);
my $listing;
my @lines;
my $j;
# Check for any completed reports.
for ($j = 0; $j<@ttypes; $j++) {
my $ttype = $ttypes[$j];
$listing = `ls */reports/$ttype/NEW_RESULTS-*`;
@lines = split(/\n/, $listing);
for ($i = 0; $i<@lines; $i++) {
my $ln = $lines[$i];
chomp($ln);
if ($ln =~ /(.*)\/NEW_RESULTS/) {
my $process = $1; # For example: ben-home/reports/fast
my $completed = `cat $ln`; # Contents of the results file
chomp($completed);
if ($ln =~ /(.*)\/reports\/$ttype\/NEW_RESULTS/) {
my $tbed = $1;
my $cmd;
my $caseid = "";
print "Processing new results, line: $ln process: $process completed: $completed testbed: $tbed\n";
# Figure out the new directory from the work-item.
my $wi = `cat ./$tbed/pending_work/$completed`;
`mv ./$tbed/pending_work/$completed /tmp/`;
if ($wi =~ /CICD_CASE_ID=(\S+)/) {
$caseid = "--caseid $1";
}
if ($wi =~ /CICD_RPT_NAME=(.*)/) {
my $widir = $1;
# Ensure we have a place to copy the new report
$cmd = "ssh $ul_host \"mkdir -p $ul_dir/$tbed/$ttype\"";
print "Ensure directory exists: $cmd\n";
`$cmd`;
# Upload the report directory
$cmd = "scp -C -r $process/$widir $ul_dest/$tbed/$ttype/";
print "Uploading: $cmd\n";
`$cmd`;
$caseid .= " --results_url $result_url_base/$tbed/$ttype/$widir";
}
else {
print "WARNING: No CICD_RPT_NAME line found in work-item contents:\n$wi\n";
}
$cmd = "cd $kpi_dir && java kpi $caseid --dir \"$pwd/$process\" && cd -";
print ("Running kpi: $cmd\n");
`$cmd`;
`rm $ln`;
$cmd = "scp -C $process/*.png $process/*.html $process/*.csv $process/*.ico $process/*.css $ul_dest/$tbed/$ttype/";
print "Uploading: $cmd";
`$cmd`;
# This might need similar partial-upload logic as that above, if it is ever actually
# enabled.
if ($other_ul_dest ne "") {
$cmd = "scp -C -r $process $other_ul_dest/$tbed/";
print "Uploading to secondary location: $cmd";
`$cmd`;
}
}
}
}
}
#Read in already_processed builds
my @processed = ();
$listing = `cat $files_processed`;
@lines = split(/\n/, $listing);
for ($i = 0; $i<@lines; $i++) {
my $ln = $lines[$i];
chomp($ln);
print("Reported already processed: $ln\n");
push(@processed, $ln);
}
my $z;
for ($z = 0; $z<@platforms; $z++) {
my $pf = $platforms[$z];
my $cmd = "curl -u $user:$passwd $url/$pf/";
print ("Calling command: $cmd\n");
$listing = `$cmd`;
@lines = split(/\n/, $listing);
for ($i = 0; $i<@lines; $i++) {
my $ln = $lines[$i];
chomp($ln);
#print("ln -:$ln:-\n");
if (($ln =~ /href=\"(.*)\">(.*)<\/a>\s+(.*)\s+\S+\s+\S+/)
|| ($ln =~ /class=\"indexcolname\"><a href=\"(.*.tar.gz)\">(.*)<\/a>.*class=\"indexcollastmod\">(\S+)\s+.*/)) {
my $fname = $1;
my $name = $2;
my $date = $3;
# Skip header
if ($ln =~ /Last modified/) {
next;
}
# Skip parent-dir
if ($ln =~ /Parent Directory/) {
next;
}
#print("line matched -:$ln:-\n");
#print("fname: $fname name: $name date: $date\n");
if ( grep( /^$fname\s+/, @processed ) ) {
# Skip this one, already processed.
next;
}
my $hw = "";
my $fdate = "";
my $githash = "";
if ($fname =~ /^(\S+)-(\d\d\d\d-\d\d-\d\d)-(\S+).tar.gz/) {
$hw = $1;
$fdate = $2;
$githash = $3;
} else {
print "ERROR: Un-handled filename syntax: $fname, assuming file-name is hardware name.\n";
$hw = $fname;
}
# Find the least used testbed for this hardware.
my $dirs = `ls`;
my @dira = split(/\n/, $dirs);
my $best_tb = "";
my $best_backlog = 0;
my $di;
for ($di = 0; $di<@dira; $di++) {
my $dname = $dira[$di];
chomp($dname);
if (! -d $dname) {
next;
}
if (! -f "$dname/TESTBED_INFO.txt") {
next;
}
my $tb_info = `cat $dname/TESTBED_INFO.txt`;
my $tb_hw_type = "";
if ($tb_info =~ /TESTBED_HW=(.*)/g) {
$tb_hw_type = $1;
}
if (!hw_matches($tb_hw_type, $hw)) {
print "Skipping test bed $dname, jfrog hardware type: -:$hw:- testbed hardware type: -:$tb_hw_type:-\n";
next;
}
print "Checking testbed $dname backlog..\n";
my $bklog = `ls $dname/pending_work/$cicd_prefix-*`;
my $bklog_count = split(/\n/, $bklog);
if ($best_tb eq "") {
$best_tb = $dname;
$best_backlog = $bklog_count;
} else {
if ($best_backlog > $bklog_count) {
$best_tb = $dname;
$best_backlog = $bklog_count;
}
}
}
if ($best_tb eq "") {
print "ERROR: No test bed found for hardware type: $hw\n";
last;
}
my $fname_nogz = $fname;
if ($fname =~ /(.*)\.tar\.gz/) {
$fname_nogz = $1;
}
my @tbs = ($best_tb);
# For more test coverage, send work to rest of the available test beds as well.
if ($duplicate_work) {
for ($di = 0; $di<@dira; $di++) {
my $dname = $dira[$di];
chomp($dname);
if (! -d $dname) {
next;
}
if ($dname eq $best_tb) {
next; # processed this one above
}
if (! -f "$dname/TESTBED_INFO.txt") {
next;
}
my $tb_info = `cat $dname/TESTBED_INFO.txt`;
my $tb_hw_type = "";
if ($tb_info =~ /TESTBED_HW=(.*)/g) {
$tb_hw_type = $1;
}
if (!hw_matches($tb_hw_type, $hw)) {
print "Skipping test bed $dname, jfrog hardware type: -:$hw:- testbed hardware type: -:$tb_hw_type:-\n";
next;
}
push(@tbs, "$dname");
}
}
my $q;
for ($q = 0; $q < @tbs; $q++) {
$best_tb = $tbs[$q];
my $caseid_fast = "";
my $caseid_basic = "";
my $tb_info = `cat $best_tb/TESTBED_INFO.txt`;
if ($tb_info =~ /TESTBED_CASEID_FAST=(.*)/g) {
$caseid_fast = $1;
}
if ($tb_info =~ /TESTBED_CASEID_BASIC=(.*)/g) {
$caseid_basic = $1;
}
my $ttype = "fast";
my $work_fname = "$best_tb/pending_work/$cicd_prefix-$fname_nogz-$ttype";
my $work_fname_a = $work_fname;
system("mkdir -p $best_tb/pending_work");
system("mkdir -p $best_tb/reports/$ttype");
open(FILE, ">", "$work_fname");
print FILE "CICD_TYPE=$ttype\n";
print FILE "CICD_RPT_NAME=$fname_nogz\n";
print FILE "CICD_RPT_DIR=$tb_url_base/$best_tb/reports/$ttype\n";
print FILE "CICD_HW=$hw\nCICD_FILEDATE=$fdate\nCICD_GITHASH=$githash\n";
print FILE "CICD_URL=$url/$pf\nCICD_FILE_NAME=$fname\nCICD_URL_DATE=$date\n";
if ($caseid_fast ne "") {
print FILE "CICD_CASE_ID=$caseid_fast\n";
}
close(FILE);
print("Next: File Name: $fname Display Name: $name Date: $date TType: $ttype\n");
print("Work item placed at: $work_fname\n");
$ttype = "basic";
$work_fname = "$best_tb/pending_work/$cicd_prefix-$fname_nogz-$ttype";
system("mkdir -p $best_tb/reports/$ttype");
open(FILE, ">", "$work_fname");
print FILE "CICD_TYPE=$ttype\n";
print FILE "CICD_RPT_NAME=$fname_nogz\n";
print FILE "CICD_RPT_DIR=$tb_url_base/$best_tb/reports/$ttype\n";
print FILE "CICD_HW=$hw\nCICD_FILEDATE=$fdate\nCICD_GITHASH=$githash\n";
print FILE "CICD_URL=$url/$pf\nCICD_FILE_NAME=$fname\nCICD_URL_DATE=$date\n";
if ($caseid_basic ne "") {
print FILE "CICD_CASE_ID=$caseid_basic\n";
}
close(FILE);
print("Next: File Name: $fname Display Name: $name Date: $date TType: $ttype\n");
print("Work item placed at: $work_fname\n");
#print("To download: curl --location -o /tmp/$fname -u $user:$passwd $url/$pf/$fname\n");
} # for all testbeds
# Note this one is processed
`echo -n "$fname " >> $files_processed`;
`date >> $files_processed`;
}
#print "$ln\n";
}# for all lines in a directory listing
}# for all URLs to process
exit 0;
sub hw_matches {
my $a = shift;
my $b = shift;
# Normalize equivalent HW types.
if ($a eq "mr8300") {
$a = "ea8300";
}
if ($b eq "mr8300") {
$b = "ea8300";
}
if ($a eq $b) {
return 1;
}
return 0;
}

449
gui/cicd/testbed_poll.pl Executable file
View File

@@ -0,0 +1,449 @@
#!/usr/bin/perl
# Query test-bed orchestator URL to see if there are new tests for us to run.
# This is expected to be run on the test-bed controller (not orchestrator)
# One of these processes will run for each test bed controlled by the controller.
use strict;
use warnings;
use Getopt::Long;
my $user = "";
my $passwd = "";
my $jfrog_user = "cicd_user";
my $jfrog_passwd = "";
my $url = "";
my $next_info = "__next_test.txt";
my $help = 0;
my $owt_log = "";
my $log = "";
my $usage = qq($0
[--jfrog_user { jfrog user (default: cicd_user) }
[--jfrog_passwd { jfrog password }
[--user { for accessing URL }
[--passwd { for accessing URL }
[--url { test-orchestrator URL for this test bed }
[--next_info { output text file containing info about the next test to process }
[--log {location} For instance: --log stdout, for openwrt_ctl expect script.
Example:
$0 --user to_user --passwd secret --jfrog_user myco-read --jfrog_passwd myco-read \\
--url https://myco.cicd.mycloud.com/testbed-ferndale-01/
# Use specific scenario file.
SCENARIO_CFG_FILE=/home/lanforge/git/wlan-testing/testbeds/ferndale-basic-01/scenario_small.txt \\
../testbed_poll.pl --jfrog_passwd myco-read --jfrog_user myco-read \\
--url http://192.168.100.195/myco/testbeds/ferndale-basic-01/pending_work/
);
GetOptions
(
'jfrog_user=s' => \$jfrog_user,
'jfrog_passwd=s' => \$jfrog_passwd,
'user=s' => \$user,
'passwd=s' => \$passwd,
'url=s' => \$url,
'next_info=s' => \$next_info,
'log=s' => \$log,
'help|?' => \$help,
) || (print($usage) && exit(1));
if ($help) {
print($usage) && exit(0);
}
if ($jfrog_passwd eq "") {
print("ERROR: You must specify jfrog password.\n");
exit(1);
}
if ($user ne "" && $passwd eq "") {
print("ERROR: You must specify a password if specifying a user.\n");
exit(1);
}
if ($log ne "") {
$owt_log = "--log $log";
}
my $i;
my $cuser = "-u $user:$passwd";
if ($user eq "") {
$cuser = "";
}
my $cmd = "curl $cuser $url";
print_note("Checking Test-Orchestrator for new work-items");
my $listing = do_system($cmd);
my @lines = split(/\n/, $listing);
# First, if any have 'fast' in them, they get precedence.
for ($i = 0; $i<@lines; $i++) {
my $ln = $lines[$i];
chomp($ln);
my $fast = 0;
if ($ln =~ /href=\"(CICD_TEST-.*-fast)\">(.*)<\/a>\s+(.*)\s+\S+\s+\S+/) {
$fast = 1;
}
elsif ($ln =~ /href=\"(CICD_TEST-.*-fast)\">(.*)<\/a>/) {
$fast = 1;
}
if ($fast) {
@lines[0] = $ln;
last;
}
}
for ($i = 0; $i<@lines; $i++) {
my $ln = $lines[$i];
chomp($ln);
my $fname = "";
my $name = "";
my $date = "";
if ($ln =~ /href=\"(CICD_TEST-.*)\">(.*)<\/a>\s+(.*)\s+\S+\s+\S+/) {
$fname = $1;
$name = $2;
$date = $3;
}
elsif ($ln =~ /href=\"(CICD_TEST-.*)\">(.*)<\/a>/) {
$fname = $1;
}
if ($fname ne "") {
# Grab that test file
$cmd = "curl --location $cuser -o $next_info $url/$fname";
do_system($cmd);
# Read in that file
my $jurl = "";
my $jfile = "";
my $report_to = "";
my $report_name = "";
my $swver = "";
my $fdate = "";
my $ttype = "";
my $listing = do_system("cat $next_info");
my @lines = split(/\n/, $listing);
for ($i = 0; $i<@lines; $i++) {
my $ln = $lines[$i];
chomp($ln);
if ($ln =~ /^CICD_URL=(.*)/) {
$jurl = $1;
}
elsif ($ln =~ /^CICD_TYPE=(.*)/) {
$ttype = $1;
}
elsif ($ln =~ /^CICD_FILE_NAME=(.*)/) {
$jfile = $1;
}
elsif ($ln =~ /^CICD_RPT_DIR=(.*)/) {
$report_to = $1;
}
elsif ($ln =~ /^CICD_RPT_NAME=(.*)/) {
$report_name = $1;
}
elsif ($ln =~ /^CICD_GITHASH=(.*)/) {
$swver = $1;
}
elsif ($ln =~ /^CICD_FILEDATE=(.*)/) {
$fdate = $1;
}
}
if ($swver eq "") {
$swver = $fdate;
}
if ($swver eq "") {
$swver = "$jfile";
}
if ($jurl eq "") {
print("ERROR: No CICD_URL found, cannot download file.\n");
exit(1);
}
if ($jfile eq "") {
print("ERROR: No CICD_FILE_NAME found, cannot download file.\n");
exit(1);
}
# Refresh wlan-ap repo if it exists.
if ( -d "../../../wlan-ap") {
do_system("cd ../../../wlan-ap && git pull && cd -");
}
print_note("Download latest AP Build from jfrog repository.");
my $cmd = "curl --location -o $jfile -u $jfrog_user:$jfrog_passwd $jurl/$jfile";
do_system($cmd);
do_system("rm -f openwrt-*.bin");
do_system("rm -f *sysupgrade.bin"); # just in case openwrt prefix changes.
do_system("tar xf $jfile");
print_note("Copy AP build to LANforge so LANforge can serve the file to AP");
# Next steps here are to put the OpenWrt file on the LANforge system
my $tb_info = do_system("cat TESTBED_INFO.txt");
my $tb_dir = "";
if ($tb_info =~ /TESTBED_DIR=(.*)/) {
$tb_dir = $1;
}
my $env = do_system(". $tb_dir/test_bed_cfg.bash && env");
my $lfmgr = "";
my $serial = "";
my $cloud_sdk = "";
if ($env =~ /LFMANAGER=(.*)/) {
$lfmgr = $1;
}
else {
print("ERRROR: Could not find LFMANAGER in environment, configuration error!\n");
print("env: $env\n");
exit(1);
}
if ($env =~ /USE_CLOUD_SDK=(\S+)/) {
$cloud_sdk = $1;
print("NOTE: Using cloud controller: $cloud_sdk\n");
}
else {
print("NOTE: NOT Using cloud controller\n");
}
#print("env: $env");
#exit(0);
if ($env =~ /AP_SERIAL=(.*)/) {
$serial = $1;
}
else {
print("ERRROR: Could not find AP_SERIAL in environment, configuration error!\n");
exit(1);
}
my $gmport = "3990";
my $gmanager = $lfmgr;
my $scenario = "myco-auto"; # matches basic_regression.bash
if ($env =~ /GMANAGER=(.*)/) {
$gmanager = $1;
}
if ($env =~ /GMPORT=(.*)/) {
$gmport = $1;
}
print_note("Restart LANforge GUI to be sure it is in known state.");
# Restart the GUI on the LANforge system
do_system("ssh lanforge\@$lfmgr pkill -f \"miglayout.*8080\"");
# and then get it onto the DUT, reboot DUT, re-configure as needed,
print_note("Request AP DUT to install the test image.");
do_system("scp *sysupgrade.bin lanforge\@$lfmgr:myco-$jfile");
# TODO: Kill anything using the serial port
do_system("sudo lsof -t $serial | sudo xargs --no-run-if-empty kill -9");
print_note("Find AP DUT default gateway.");
# and then kick off automated regression test.
# Default gateway on the AP should be one of the ports on the LANforge system, so we can use
# that to scp the file to the DUT, via serial-console connection this controller has to the DUT.
my $ap_route = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action cmd --value \"ip route show\"");
my $ap_gw = "";
if ($ap_route =~ /default via (\S+)/) {
$ap_gw = $1;
}
if ($ap_gw eq "") {
print("ERROR: Could not find default gateway for AP, route info:\n$ap_route\n");
if ($ap_route =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(33);
}
# Re-apply scenario so the LANforge gateway/NAT is enabled for sure.
my $out = do_system("../../lanforge/lanforge-scripts/lf_gui_cmd.pl --manager $gmanager --port $gmport --scenario $scenario");
# TODO: Use power-controller to reboot the AP and retry.
if ($out =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(34);
}
$out = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action reboot");
print ("Reboot DUT to try to recover networking:\n$out\n");
if ($out =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(35);
}
sleep(15);
$ap_route = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action cmd --value \"ip route show\"");
if ($ap_route =~ /default via (\S+)/g) {
$ap_gw = $1;
}
if ($ap_route =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(36);
}
if ($ap_gw eq "") {
exit(1);
}
}
print_note("Request AP DUT to install the test image and reboot.");
# TODO: Change this to curl download??
my $ap_out = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action sysupgrade --value \"lanforge\@$ap_gw:myco-$jfile\"");
print ("Sys-upgrade results:\n$ap_out\n");
if ($ap_out =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(37);
}
# TODO: Verify this (and reboot below) worked. DUT can get wedged and in that case it will need
# a power-cycle to continue.
# System should be rebooted at this point.
sleep(10); # Give it some more time
if ($cloud_sdk eq "") {
print_note("Initialize AP, disable OpenVsync since this is stand-alone testbed.");
# Disable openvsync, it will re-write /etc/config/wireless
# This code should not be used when we get cloud-sdk wired up.
$ap_out = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action cmd --value \"service opensync stop\"");
print ("Stop openvsync:\n$ap_out\n");
if ($ap_out =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(38);
}
$ap_out = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action cmd --value \"service opensync disable\"");
print ("Disable openvsync:\n$ap_out\n");
if ($ap_out =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(39);
}
}
else {
print_note("Initialize AP, enable OpenVsync since this testbed is using Cloud-Controler: $cloud_sdk.");
$ap_out = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action cmd --value \"service opensync enable\"");
print ("Enable openvsync:\n$ap_out\n");
if ($ap_out =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(40);
}
}
# Re-apply overlay
print_note("Apply default AP configuration for this test bed.");
if ($cloud_sdk eq "") {
$ap_out = do_system("cd $tb_dir/OpenWrt-overlay && tar -cvzf ../overlay_tmp.tar.gz * && scp ../overlay_tmp.tar.gz lanforge\@$lfmgr:myco-overlay.tar.gz");
}
else {
# Create /etc/hosts file that points us towards correct cloud-sdk machine
my $etc_hosts = "$tb_dir/OpenWrt-overlay/etc/hosts";
open(FILE, ">", "$etc_hosts");
print FILE "# Auto-Created by CICD process
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
$cloud_sdk opensync-mqtt-broker
$cloud_sdk opensync-wifi-controller
$cloud_sdk opensync.zone1.art2wave.com
";
# Leave 'wireless' out of the overlay since opensync will be designed to work with default config.
$ap_out = do_system("cd $tb_dir/OpenWrt-overlay && tar -cvzf ../overlay_tmp.tar.gz --exclude etc/config/wireless * && scp ../overlay_tmp.tar.gz lanforge\@$lfmgr:myco-overlay.tar.gz");
unlink($etc_hosts);
}
print ("Create overlay zip:\n$ap_out\n");
for (my $q = 0; $q<10; $q++) {
$ap_out = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action download --value \"lanforge\@$ap_gw:myco-overlay.tar.gz\" --value2 \"overlay.tgz\"");
print ("Download overlay to DUT:\n$ap_out\n");
if ($ap_out =~ /ERROR: Could not connect to LANforge/g) {
# Try to restart the network
$ap_out = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action cmd --value \"/etc/init.d/network restart\"");
print ("Request restart of DUT networking:\n$ap_out\n");
if ($q == 9) {
# We have failed to apply overlay at this point, bail out.
print("ERROR: Could not apply overlay to DUT, exiting test attempt.\n");
exit(1);
}
print("Will retry overlay download in 10 seconds, try $q / 10\n");
sleep(10);
}
else {
last;
}
}
$ap_out = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action cmd --value \"cd / && tar -xzf /tmp/overlay.tgz\"");
print ("Un-zip overlay on DUT:\n$ap_out\n");
if ($ap_out =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(41);
}
print_note("Reboot AP so that new configuration is applied.");
$ap_out = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action reboot");
print ("Rebooted DUT so overlay takes effect:\n$ap_out\n");
if ($ap_out =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(42);
}
if ($ttype eq "fast") {
print_note("Start 'Fast' LANforge regression test.");
$ap_out = do_system("cd $tb_dir && DUT_SW_VER=$swver ./run_basic_fast.bash");
}
else {
print_note("Start 'Fast' LANforge regression test.");
$ap_out = do_system("cd $tb_dir && DUT_SW_VER=$swver ./run_basic.bash");
}
print("Regression $ttype test script output:\n$ap_out\n");
print_note("Upload results.");
#When complete, upload the results to the requested location.
if ($ap_out =~ /Results-Dir: (.*)/) {
my $rslts_dir = $1;
if ($rslts_dir =~ /(.*)\'/) {
$rslts_dir = $1;
}
print ("Found results at: $rslts_dir\n");
do_system("rm -fr /tmp/$report_name");
do_system("mv $rslts_dir /tmp/$report_name");
do_system("scp -C -r /tmp/$report_name $report_to/");
do_system("echo $fname > /tmp/NEW_RESULTS-$fname");
do_system("scp /tmp/NEW_RESULTS-$fname $report_to/");
# This will indirectly stop logread if it is running.
$ap_out = do_system("../../lanforge/lanforge-scripts/openwrt_ctl.py $owt_log --scheme serial --tty $serial --action cmd --value \"uptime\"");
if ($ap_out =~ /pexpect.exceptions.TIMEOUT/) {
print("FATAL-ERROR: DUT is in bad state, bail out.\n");
exit(43);
}
}
exit(0);
}
#print "$ln\n";
}
exit 0;
sub do_system {
my $cmd = shift;
print ">>> $cmd\n";
return `$cmd 2>&1`;
}
sub print_note {
my $n = shift;
my $hdr = "###############################################################";
print "\n\n\n$hdr\n### $n\n$hdr\n\n";
}

View File

@@ -0,0 +1,23 @@
This automation assumes that the AP is configured as pass-through AP, not
router:
# Until cloud-sdk is integrated, stop opensync so we can do local config
service opensync stop
service opensync disable
# Configure /etc/config/network to bridge eth ports and wifi devices.
# Disable DHCP
/etc/init.d/dnsmasq disable
/etc/init.d/dnsmasq stop
# Disable DHCP v6
/etc/init.d/odhcpd disable
/etc/init.d/odhcpd stop
# Disable firewall ???
/etc/init.d/firewall disable
/etc/init.d/firewall stop
/etc/init.d/network reload

View File

@@ -0,0 +1,10 @@
DUT is an MR8300, running OpenWrt.
This uses ath10k-ct firmware, and by default, the ath10k driver only supports 32 stations per
radio. To improve this, I tweaked the setup using the fwcfg files.
The radios also only work on certain frequencies, so one has to configure them
carefully.
See the OpenWrt-overlay directory for files that should be copied onto the DUT
to work with this test. Once OpenSync cloud stuff is complete, the overlay may
not be needed.

View File

@@ -0,0 +1,57 @@
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11a'
option path 'soc/40000000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
option htmode 'VHT80'
option disabled '0'
option channel '149'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option disabled '0'
option ssid 'Default-SSID-5gu'
option hidden '0'
option key '12345678'
option encryption 'psk-mixed'
option isolate '1'
config wifi-device 'radio1'
option type 'mac80211'
option hwmode '11g'
option path 'platform/soc/a000000.wifi'
option htmode 'HT20'
option disabled '0'
option channel '6'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option disabled '0'
option ssid 'Default-SSID-2g'
option hidden '0'
option key '12345678'
option encryption 'psk-mixed'
option isolate '1'
config wifi-device 'radio2'
option type 'mac80211'
option hwmode '11a'
option path 'platform/soc/a800000.wifi'
option htmode 'VHT80'
option disabled '0'
option channel '36'
config wifi-iface 'default_radio2'
option device 'radio2'
option network 'lan'
option mode 'ap'
option ssid 'Default-SSID-5gl'
option key '12345678'
option encryption 'psk-mixed'
option isolate '1'
option hidden '0'
option disabled '0'

View File

@@ -0,0 +1,16 @@
vdevs = 8
peers = 162
active_peers = 162
stations = 162
rate_ctrl_objs = 7
regdom = 840
#fwname = firmware-5-htt-mgt-b.bin
fwver = 5
nohwcrypt = 0
ct_sta_mode = 0
tx_desc = 2000
#max_nss = 3
tids = 260
skid_limit = 360
max_amsdus = 3

View File

@@ -0,0 +1,16 @@
vdevs = 8
peers = 162
active_peers = 162
stations = 162
rate_ctrl_objs = 7
regdom = 840
#fwname = firmware-5-htt-mgt-b.bin
fwver = 5
nohwcrypt = 0
ct_sta_mode = 0
tx_desc = 2000
#max_nss = 3
tids = 260
skid_limit = 360
max_amsdus = 3

View File

@@ -0,0 +1,16 @@
# 9888 chip
vdevs = 8
peers = 202
active_peers = 202
stations = 202
rate_ctrl_objs = 7
regdom = 840
#fwname = firmware-5-htt-mgt-b.bin
fwver = 5
nohwcrypt = 0
ct_sta_mode = 0
tx_desc = 2200
#max_nss = 3
tids = 450
skid_limit = 360
max_amsdus = 3

View File

@@ -0,0 +1,107 @@
[BLANK]
sel_port-0: 1.1.sta00500
show_events: 1
show_log: 0
port_sorting: 0
kpi_id: AP Auto
bg: 0xE0ECF8
test_rig:
show_scan: 1
auto_helper: 1
skip_2: 1
skip_5: 1
dut5-0: ea8300 OpenWrt-5lo
dut2-0: ea8300 OpenWrt-2
dut5-1: NA
dut2-1: NA
dut5-2: ea8300 OpenWrt-2
dut2-2: NA
spatial_streams: AUTO
bandw_options: AUTO
modes: Auto
upstream_port: 1.1.2 eth2
operator:
mconn: 1
tos: 0
vid_buf: 1000000
vid_speed: 700000
reset_stall_thresh_udp_dl: 9600
reset_stall_thresh_udp_ul: 9600
reset_stall_thresh_tcp_dl: 9600
reset_stall_thresh_tcp_ul: 9600
reset_stall_thresh_l4: 100000
reset_stall_thresh_voip: 20000
stab_udp_dl_min: 56000
stab_udp_dl_max: 0
stab_udp_ul_min: 56000
stab_udp_ul_max: 0
stab_tcp_dl_min: 500000
stab_tcp_dl_max: 0
stab_tcp_ul_min: 500000
stab_tcp_ul_max: 0
dl_speed: 85%
ul_speed: 85%
max_stations_2: 128
max_stations_5: 132
max_stations_dual: 260
lt_sta: 2
voip_calls: 0
lt_dur: 3600
reset_dur: 600
lt_gi: 30
dur20: 20
hunt_retries: 1
cap_dl: 1
cap_ul: 0
cap_use_pkt_sizes: 0
stability_reset_radios: 0
pkt_loss_thresh: 10000
frame_sizes: 200, 512, 1024, MTU
capacities: 1, 2, 5, 10, 20, 40, 64, 128, 256, 512, 1024, MAX
radio2-0: 1.1.4 wiphy0
radio2-1: 1.1.6 wiphy2
radio5-0: 1.1.5 wiphy1
radio5-1: 1.1.7 wiphy3
radio5-2: 1.1.8 wiphy4
radio5-3: 1.1.9 wiphy5
radio5-4: 1.1.10 wiphy6
radio5-5: 1.1.11 wiphy7
basic_cx: 1
tput: 0
dual_band_tput: 0
capacity: 0
longterm: 0
mix_stability: 0
loop_iter: 1
reset_batch_size: 1
reset_duration_min: 10000
reset_duration_max: 60000
# Configure pass/fail metrics for this testbed.
pf_text0: 2.4 DL 200 70Mbps
pf_text1: 2.4 DL 512 110Mbps
pf_text2: 2.4 DL 1024 115Mbps
pf_text3: 2.4 DL MTU 120Mbps
pf_text4:
pf_text5: 2.4 UL 200 88Mbps
pf_text6: 2.4 UL 512 106Mbps
pf_text7: 2.4 UL 1024 115Mbps
pf_text8: 2.4 UL MTU 120Mbps
pf_text9:
pf_text10: 5 DL 200 72Mbps
pf_text11: 5 DL 512 185Mbps
pf_text12: 5 DL 1024 370Mbps
pf_text13: 5 DL MTU 525Mbps
pf_text14:
pf_text15: 5 UL 200 90Mbps
pf_text16: 5 UL 512 230Mbps
pf_text17: 5 UL 1024 450Mbps
pf_text18: 5 UL MTU 630Mbps
# Tune connect-time thresholds.
cx_prcnt: 950000
cx_open_thresh: 35
cx_psk_thresh: 75
cx_1x_thresh: 130

View File

@@ -0,0 +1,55 @@
[BLANK]
show_events: 1
show_log: 0
port_sorting: 0
kpi_id: Dataplane
bg: 0xE0ECF8
test_rig:
show_scan: 1
auto_helper: 0
skip_2: 0
skip_5: 0
selected_dut: ea8300
duration: 15000
traffic_port: 1.1.136 sta01001
upstream_port: 1.1.2 eth2
path_loss: 10
speed: 85%
speed2: 0Kbps
min_rssi_bound: -150
max_rssi_bound: 0
channels: AUTO
modes: Auto
pkts: 60;142;256;512;1024;MTU;4000
spatial_streams: AUTO
security_options: AUTO
bandw_options: AUTO
traffic_types: UDP
directions: DUT Transmit;DUT Receive
txo_preamble: OFDM
txo_mcs: 0 CCK, OFDM, HT, VHT
txo_retries: No Retry
txo_sgi: OFF
txo_txpower: 15
attenuator: 0
attenuator2: 0
attenuator_mod: 255
attenuator_mod2: 255
attenuations: 0..+50..950
attenuations2: 0..+50..950
chamber: 0
tt_deg: 0..+45..359
cust_pkt_sz:
show_3s: 0
show_ll_graphs: 1
show_gp_graphs: 1
show_1m: 1
pause_iter: 0
show_realtime: 1
operator:
mconn: 1
mpkt: 1000
tos: 0
loop_iterations: 1

View File

@@ -0,0 +1,71 @@
#!/bin/bash
# Example usage of this script
# DUT_SW_VER=my-build-id ./run_basic.bash
#
# Other DUT variables in test_bed_cfg.bash may also be over-ridden,
# including those below. See LANforge 'add_dut' CLI command for
# details on what these variables are for.
# DUT_FLAGS DUT_FLAGS_MASK DUT_SW_VER DUT_HW_VER DUT_MODEL
# DUT_SERIAL DUT_SSID1 DUT_SSID2 DUT_SSID3
# DUT_PASSWD1 DUT_PASSWD2 DUT_PASSWD3
# DUT_BSSID1 DUT_BSSID2 DUT_BSSID3
# Source config file
. test_bed_cfg.bash
echo "<b>Top wlan-testing git commits.</b><br><pre>" > ./tmp_gitlog.html
git log -n 8 --oneline >> ./tmp_gitlog.html
echo "</pre>" >> ./tmp_gitlog.html
NOTES_HTML=`pwd`/testbed_notes.html
GITLOG=`pwd`/tmp_gitlog.html
if [ -d "../../../wlan-ap" ]
then
DUTGITLOG=/tmp/${DUT_SW_VER}_dut_gitlog.html
echo "<b>Top wlan-ap git commits.</b><br><pre>" > $DUTGITLOG
(cd ../../../wlan-ap && git log -n 8 --oneline $DUT_SW_VER >> $DUTGITLOG && cd -)
echo "</pre>" >> $DUTGITLOG
export DUTGITLOG
fi
export NOTES_HTML GITLOG
# TODO: Copy config file to cloud controller and restart it
# and/or do other config to make it work.
# Change to scripts dir
cd ../../
# Where to place results. basic_regression.bash will use this variable.
RSLTS_DIR=/tmp/ferndale-01-basic-regression
export RSLTS_DIR
# Clean any existing data from the results dir
rm -fr $RSLTS_DIR
# Run one test
# DEFAULT_ENABLE=0 DO_SHORT_AP_STABILITY_RESET=1 ./basic_regression.bash
# Clean up old DHCP leases
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --cmd "cli clear_port_counters ALL ALL ALL dhcp_leases"
# Run all tests
./basic_regression.bash
cd -
if [ ! -d $RSLTS_DIR ]
then
echo "Test did not run as expected, $RSLTS_DIR not found."
mkdir -p $RSLTS_DIR
fi
if [ -f ${MY_TMPDIR}/basic_regression_log.txt ]
then
echo "Found ${MY_TMPDIR}/basic_regression_log.txt, moving into $RSLTS_DIR"
mv ${MY_TMPDIR}/basic_regression_log.txt $RSLTS_DIR/
fi
echo "See results in $RSLTS_DIR"

View File

@@ -0,0 +1,81 @@
#!/bin/bash
# Example usage of this script
# DUT_SW_VER=my-build-id ./run_basic.bash
#
# Other DUT variables in test_bed_cfg.bash may also be over-ridden,
# including those below. See LANforge 'add_dut' CLI command for
# details on what these variables are for.
# DUT_FLAGS DUT_FLAGS_MASK DUT_SW_VER DUT_HW_VER DUT_MODEL
# DUT_SERIAL DUT_SSID1 DUT_SSID2 DUT_SSID3
# DUT_PASSWD1 DUT_PASSWD2 DUT_PASSWD3
# DUT_BSSID1 DUT_BSSID2 DUT_BSSID3
DO_SHORT_AP_BASIC_CX=${DO_SHORT_AP_BASIC_CX:-1}
DO_WCT_BI=${DO_WCT_BI:-1}
export DO_SHORT_AP_BASI_CX DO_WCT_BI
# Source config file
. test_bed_cfg.bash
echo "<b>Top wlan-testing git commits.</b><br><pre>" > ./tmp_gitlog.html
git log -n 8 --oneline >> ./tmp_gitlog.html
echo "</pre>" >> ./tmp_gitlog.html
NOTES_HTML=`pwd`/testbed_notes.html
GITLOG=`pwd`/tmp_gitlog.html
if [ -d "../../../wlan-ap" ]
then
DUTGITLOG=/tmp/${DUT_SW_VER}_dut_gitlog.html
echo "<b>Top wlan-ap git commits.</b><br><pre>" > $DUTGITLOG
(cd ../../../wlan-ap && git log -n 8 --oneline $DUT_SW_VER >> $DUTGITLOG && cd -)
echo "</pre>" >> $DUTGITLOG
export DUTGITLOG
fi
export NOTES_HTML GITLOG
# TODO: Copy config file to cloud controller and restart it
# and/or do other config to make it work.
# Change to scripts dir
cd ../../
# Where to place results. basic_regression.bash will use this variable.
RSLTS_DIR=/tmp/ferndale-01-basic-regression-fast
export RSLTS_DIR
# Clean any existing data from the results dir
rm -fr $RSLTS_DIR
# Clean up old DHCP leases
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --cmd "cli clear_port_counters ALL ALL ALL dhcp_leases"
# Run a subset of available tests
# See 'Tests to run' comment in basic_regression.bash for available options.
#DEFAULT_ENABLE=0 WCT_DURATION=20s DO_SHORT_AP_BASIC_CX=1 DO_WCT_BI=1 ./basic_regression.bash
DEFAULT_ENABLE=0 WCT_DURATION=20s ./basic_regression.bash
# Run all tests
#./basic_regression.bash
cd -
if [ ! -d $RSLTS_DIR ]
then
echo "Test did not run as expected, $RSLTS_DIR not found."
mkdir -p $RSLTS_DIR
fi
if [ -f ${MY_TMPDIR}/basic_regression_log.txt ]
then
echo "Found ${MY_TMPDIR}/basic_regression_log.txt, moving into $RSLTS_DIR"
mv ${MY_TMPDIR}/basic_regression_log.txt $RSLTS_DIR/
fi
echo "See results in $RSLTS_DIR"

View File

@@ -0,0 +1,15 @@
profile_link 1.1 STA-AC 64 'DUT: ea8300 Radio-1' NA wiphy0,AUTO -1
profile_link 1.1 STA-AC 64 'DUT: ea8300 Radio-1' NA wiphy2,AUTO -1
profile_link 1.1 STA-AC 64 'DUT: ea8300 Radio-2' NA wiphy1,AUTO -1
profile_link 1.1 STA-AC 64 'DUT: ea8300 Radio-3' NA wiphy3,AUTO -1
profile_link 1.1 upstream-dhcp 1 NA NA eth2,AUTO -1
profile_link 1.1 uplink-nat 1 'DUT: upstream LAN 92.168.100.1/24' NA eth3,eth2 -1
profile_link 1.1 STA-AC 1 'DUT: ea8300 Radio-2' NA wiphy4,AUTO -1
profile_link 1.1 STA-AC 1 'DUT: ea8300 Radio-3' NA wiphy5,AUTO -1
profile_link 1.1 STA-AC 1 'DUT: ea8300 Radio-2' NA wiphy6,AUTO -1
profile_link 1.1 STA-AC 1 'DUT: ea8300 Radio-3' NA wiphy7,AUTO -1
dut ea8300 393 148
dut upstream 306 62
resource 1.1 132 218

View File

@@ -0,0 +1,15 @@
profile_link 1.1 STA-AC 8 'DUT: ea8300 Radio-1' NA wiphy0,AUTO -1
profile_link 1.1 STA-AC 8 'DUT: ea8300 Radio-1' NA wiphy2,AUTO -1
profile_link 1.1 STA-AC 8 'DUT: ea8300 Radio-2' NA wiphy1,AUTO -1
profile_link 1.1 STA-AC 8 'DUT: ea8300 Radio-3' NA wiphy3,AUTO -1
profile_link 1.1 upstream-dhcp 1 NA NA eth2,AUTO -1
profile_link 1.1 uplink-nat 1 'DUT: upstream LAN 92.168.100.1/24' NA eth3,eth2 -1
#profile_link 1.1 STA-AC 1 'DUT: ea8300 Radio-2' NA wiphy4,AUTO -1
#profile_link 1.1 STA-AC 1 'DUT: ea8300 Radio-3' NA wiphy5,AUTO -1
#profile_link 1.1 STA-AC 1 'DUT: ea8300 Radio-2' NA wiphy6,AUTO -1
#profile_link 1.1 STA-AC 1 'DUT: ea8300 Radio-3' NA wiphy7,AUTO -1
dut ea8300 393 148
dut upstream 306 62
resource 1.1 132 218

View File

@@ -0,0 +1,61 @@
# Example test-bed configuration
# Scripts should source this file to set the default environment variables
# and then override the variables specific to their test case (and it can be done
# in opposite order for same results
#
# After the env variables are set,
# call the 'lanforge/lanforge-scripts/gui/basic_regression.bash'
# from the directory in which it resides.
PWD=`pwd`
AP_SERIAL=${AP_SERIAL:-/dev/ttyUSB1}
LF_SERIAL=${LF_SERIAL:-/dev/ttyUSB0}
LFPASSWD=${LFPASSWD:-lanforge} # Root password on LANforge machine
AP_AUTO_CFG_FILE=${AP_AUTO_CFG_FILE:-$PWD/ap-auto.txt}
WCT_CFG_FILE=${WCT_CFG_FILE:-$PWD/wct.txt}
DPT_CFG_FILE=${DPT_CFG_FILE:-$PWD/dpt-pkt-sz.txt}
SCENARIO_CFG_FILE=${SCENARIO_CFG_FILE:-$PWD/scenario.txt}
# Default to enable cloud-sdk for this testbed, cloud-sdk is at IP addr below
USE_CLOUD_SDK=${USE_CLOUD_SDK:-192.168.100.164}
# LANforge target machine
LFMANAGER=${LFMANAGER:-192.168.100.209}
# LANforge GUI machine (may often be same as target)
GMANAGER=${GMANAGER:-192.168.100.209}
GMPORT=${GMPORT:-3990}
MY_TMPDIR=${MY_TMPDIR:-/tmp}
# Test configuration (10 minutes by default, in interest of time)
STABILITY_DURATION=${STABILITY_DURATION:-600}
TEST_RIG_ID=${TEST_RIG_ID:-Ferndale-01-Basic}
# DUT configuration
DUT_FLAGS=${DUT_FLAGS:-0x22} # AP, WPA-PSK
#DUT_FLAGS=${DUT_FLAGS:-0x2} # AP, Open
DUT_FLAGS_MASK=${DUT_FLAGS_MASK:-0xFFFF}
DUT_SW_VER=${DUT_SW_VER:-OpenWrt-Stock}
DUT_HW_VER=Linksys-EA8300
DUT_MODEL=Linksys-EA8300
DUT_SERIAL=${DUT_SERIAL:-NA}
DUT_SSID1=${DUT_SSID1:-Default-SSID-2g}
DUT_SSID2=${DUT_SSID2:-Default-SSID-5gl}
DUT_SSID3=${DUT_SSID3:-Default-SSID-5gu}
DUT_PASSWD1=${DUT_PASSWD1:-12345678}
DUT_PASSWD2=${DUT_PASSWD2:-12345678}
DUT_PASSWD3=${DUT_PASSWD3:-12345678}
DUT_BSSID1=24:f5:a2:08:21:6c
DUT_BSSID2=24:f5:a2:08:21:6d
DUT_BSSID3=24:f5:a2:08:21:6e
export LF_SERIAL AP_SERIAL LFPASSWD
export AP_AUTO_CFG_FILE WCT_CFG_FILE DPT_CFG_FILE SCENARIO_CFG_FILE
export LFMANAGER GMANAGER GMPORT MY_TMPDIR
export STABILITY_DURATION TEST_RIG_ID
export DUT_FLAGS DUT_FLAGS_MASK DUT_SW_VER DUT_HW_VER DUT_MODEL
export DUT_SERIAL DUT_SSID1 DUT_SSID2 DUT_SSID3
export DUT_PASSWD1 DUT_PASSWD2 DUT_PASSWD3
export DUT_BSSID1 DUT_BSSID2 DUT_BSSID3
export USE_CLOUD_SDK

View File

@@ -0,0 +1,323 @@
[BLANK]
sel_port-0: 1.1.eth2
sel_port-1: 1.1.sta00000
sel_port-2: 1.1.sta01000
sel_port-3: 1.1.sta00500
sel_port-4: 1.1.sta01500
sel_port-5: 1.1.sta03000
sel_port-6: 1.1.sta03500
sel_port-7: 1.1.sta04000
sel_port-8: 1.1.sta04500
sel_port-9: 1.1.sta00001
sel_port-10: 1.1.sta01001
sel_port-11: 1.1.sta00501
sel_port-12: 1.1.sta01501
sel_port-13: 1.1.sta00002
sel_port-14: 1.1.sta01002
sel_port-15: 1.1.sta00502
sel_port-16: 1.1.sta01502
sel_port-17: 1.1.sta00003
sel_port-18: 1.1.sta01003
sel_port-19: 1.1.sta00503
sel_port-20: 1.1.sta01503
sel_port-21: 1.1.sta00004
sel_port-22: 1.1.sta01004
sel_port-23: 1.1.sta00504
sel_port-24: 1.1.sta01504
sel_port-25: 1.1.sta00005
sel_port-26: 1.1.sta01005
sel_port-27: 1.1.sta00505
sel_port-28: 1.1.sta01505
sel_port-29: 1.1.sta00006
sel_port-30: 1.1.sta01006
sel_port-31: 1.1.sta00506
sel_port-32: 1.1.sta01506
sel_port-33: 1.1.sta00007
sel_port-34: 1.1.sta01007
sel_port-35: 1.1.sta00507
sel_port-36: 1.1.sta01507
sel_port-37: 1.1.sta00008
sel_port-38: 1.1.sta01008
sel_port-39: 1.1.sta00508
sel_port-40: 1.1.sta01508
sel_port-41: 1.1.sta00009
sel_port-42: 1.1.sta01009
sel_port-43: 1.1.sta00509
sel_port-44: 1.1.sta01509
sel_port-45: 1.1.sta00010
sel_port-46: 1.1.sta01010
sel_port-47: 1.1.sta00510
sel_port-48: 1.1.sta01510
sel_port-49: 1.1.sta00011
sel_port-50: 1.1.sta01011
sel_port-51: 1.1.sta00511
sel_port-52: 1.1.sta01511
sel_port-53: 1.1.sta00012
sel_port-54: 1.1.sta01012
sel_port-55: 1.1.sta00512
sel_port-56: 1.1.sta01512
sel_port-57: 1.1.sta00013
sel_port-58: 1.1.sta01013
sel_port-59: 1.1.sta00513
sel_port-60: 1.1.sta01513
sel_port-61: 1.1.sta00014
sel_port-62: 1.1.sta01014
sel_port-63: 1.1.sta00514
sel_port-64: 1.1.sta01514
sel_port-65: 1.1.sta00015
sel_port-66: 1.1.sta01015
sel_port-67: 1.1.sta00515
sel_port-68: 1.1.sta01515
sel_port-69: 1.1.sta00016
sel_port-70: 1.1.sta01016
sel_port-71: 1.1.sta00516
sel_port-72: 1.1.sta01516
sel_port-73: 1.1.sta00017
sel_port-74: 1.1.sta01017
sel_port-75: 1.1.sta00517
sel_port-76: 1.1.sta01517
sel_port-77: 1.1.sta00018
sel_port-78: 1.1.sta01018
sel_port-79: 1.1.sta00518
sel_port-80: 1.1.sta01518
sel_port-81: 1.1.sta00019
sel_port-82: 1.1.sta01019
sel_port-83: 1.1.sta00519
sel_port-84: 1.1.sta01519
sel_port-85: 1.1.sta00020
sel_port-86: 1.1.sta01020
sel_port-87: 1.1.sta00520
sel_port-88: 1.1.sta01520
sel_port-89: 1.1.sta00021
sel_port-90: 1.1.sta01021
sel_port-91: 1.1.sta00521
sel_port-92: 1.1.sta01521
sel_port-93: 1.1.sta00022
sel_port-94: 1.1.sta01022
sel_port-95: 1.1.sta00522
sel_port-96: 1.1.sta01522
sel_port-97: 1.1.sta00023
sel_port-98: 1.1.sta01023
sel_port-99: 1.1.sta00523
sel_port-100: 1.1.sta01523
sel_port-101: 1.1.sta00024
sel_port-102: 1.1.sta01024
sel_port-103: 1.1.sta00524
sel_port-104: 1.1.sta01524
sel_port-105: 1.1.sta00025
sel_port-106: 1.1.sta01025
sel_port-107: 1.1.sta00525
sel_port-108: 1.1.sta01525
sel_port-109: 1.1.sta00026
sel_port-110: 1.1.sta01026
sel_port-111: 1.1.sta00526
sel_port-112: 1.1.sta01526
sel_port-113: 1.1.sta00027
sel_port-114: 1.1.sta01027
sel_port-115: 1.1.sta00527
sel_port-116: 1.1.sta01527
sel_port-117: 1.1.sta00028
sel_port-118: 1.1.sta01028
sel_port-119: 1.1.sta00528
sel_port-120: 1.1.sta01528
sel_port-121: 1.1.sta00029
sel_port-122: 1.1.sta01029
sel_port-123: 1.1.sta00529
sel_port-124: 1.1.sta01529
sel_port-125: 1.1.sta00030
sel_port-126: 1.1.sta01030
sel_port-127: 1.1.sta00530
sel_port-128: 1.1.sta01530
sel_port-129: 1.1.sta00031
sel_port-130: 1.1.sta01031
sel_port-131: 1.1.sta00531
sel_port-132: 1.1.sta01531
sel_port-133: 1.1.sta00032
sel_port-134: 1.1.sta01032
sel_port-135: 1.1.sta00532
sel_port-136: 1.1.sta01532
sel_port-137: 1.1.sta00033
sel_port-138: 1.1.sta01033
sel_port-139: 1.1.sta00533
sel_port-140: 1.1.sta01533
sel_port-141: 1.1.sta00034
sel_port-142: 1.1.sta01034
sel_port-143: 1.1.sta00534
sel_port-144: 1.1.sta01534
sel_port-145: 1.1.sta00035
sel_port-146: 1.1.sta01035
sel_port-147: 1.1.sta00535
sel_port-148: 1.1.sta01535
sel_port-149: 1.1.sta00036
sel_port-150: 1.1.sta01036
sel_port-151: 1.1.sta00536
sel_port-152: 1.1.sta01536
sel_port-153: 1.1.sta00037
sel_port-154: 1.1.sta01037
sel_port-155: 1.1.sta00537
sel_port-156: 1.1.sta01537
sel_port-157: 1.1.sta00038
sel_port-158: 1.1.sta01038
sel_port-159: 1.1.sta00538
sel_port-160: 1.1.sta01538
sel_port-161: 1.1.sta00039
sel_port-162: 1.1.sta01039
sel_port-163: 1.1.sta00539
sel_port-164: 1.1.sta01539
sel_port-165: 1.1.sta00040
sel_port-166: 1.1.sta01040
sel_port-167: 1.1.sta00540
sel_port-168: 1.1.sta01540
sel_port-169: 1.1.sta00041
sel_port-170: 1.1.sta01041
sel_port-171: 1.1.sta00541
sel_port-172: 1.1.sta01541
sel_port-173: 1.1.sta00042
sel_port-174: 1.1.sta01042
sel_port-175: 1.1.sta00542
sel_port-176: 1.1.sta01542
sel_port-177: 1.1.sta00043
sel_port-178: 1.1.sta01043
sel_port-179: 1.1.sta00543
sel_port-180: 1.1.sta01543
sel_port-181: 1.1.sta00044
sel_port-182: 1.1.sta01044
sel_port-183: 1.1.sta00544
sel_port-184: 1.1.sta01544
sel_port-185: 1.1.sta00045
sel_port-186: 1.1.sta01045
sel_port-187: 1.1.sta00545
sel_port-188: 1.1.sta01545
sel_port-189: 1.1.sta00046
sel_port-190: 1.1.sta01046
sel_port-191: 1.1.sta00546
sel_port-192: 1.1.sta01546
sel_port-193: 1.1.sta00047
sel_port-194: 1.1.sta01047
sel_port-195: 1.1.sta00547
sel_port-196: 1.1.sta01547
sel_port-197: 1.1.sta00048
sel_port-198: 1.1.sta01048
sel_port-199: 1.1.sta00548
sel_port-200: 1.1.sta01548
sel_port-201: 1.1.sta00049
sel_port-202: 1.1.sta01049
sel_port-203: 1.1.sta00549
sel_port-204: 1.1.sta01549
sel_port-205: 1.1.sta00050
sel_port-206: 1.1.sta01050
sel_port-207: 1.1.sta00550
sel_port-208: 1.1.sta01550
sel_port-209: 1.1.sta00051
sel_port-210: 1.1.sta01051
sel_port-211: 1.1.sta00551
sel_port-212: 1.1.sta01551
sel_port-213: 1.1.sta00052
sel_port-214: 1.1.sta01052
sel_port-215: 1.1.sta00552
sel_port-216: 1.1.sta01552
sel_port-217: 1.1.sta00053
sel_port-218: 1.1.sta01053
sel_port-219: 1.1.sta00553
sel_port-220: 1.1.sta01553
sel_port-221: 1.1.sta00054
sel_port-222: 1.1.sta01054
sel_port-223: 1.1.sta00554
sel_port-224: 1.1.sta01554
sel_port-225: 1.1.sta00055
sel_port-226: 1.1.sta01055
sel_port-227: 1.1.sta00555
sel_port-228: 1.1.sta01555
sel_port-229: 1.1.sta00056
sel_port-230: 1.1.sta01056
sel_port-231: 1.1.sta00556
sel_port-232: 1.1.sta01556
sel_port-233: 1.1.sta00057
sel_port-234: 1.1.sta01057
sel_port-235: 1.1.sta00557
sel_port-236: 1.1.sta01557
sel_port-237: 1.1.sta00058
sel_port-238: 1.1.sta01058
sel_port-239: 1.1.sta00558
sel_port-240: 1.1.sta01558
sel_port-241: 1.1.sta00059
sel_port-242: 1.1.sta01059
sel_port-243: 1.1.sta00559
sel_port-244: 1.1.sta01559
sel_port-245: 1.1.sta00060
sel_port-246: 1.1.sta01060
sel_port-247: 1.1.sta00560
sel_port-248: 1.1.sta01560
sel_port-249: 1.1.sta00061
sel_port-250: 1.1.sta01061
sel_port-251: 1.1.sta00561
sel_port-252: 1.1.sta01561
sel_port-253: 1.1.sta00062
sel_port-254: 1.1.sta01062
sel_port-255: 1.1.sta00562
sel_port-256: 1.1.sta01562
sel_port-257: 1.1.sta00063
sel_port-258: 1.1.sta01063
sel_port-259: 1.1.sta00563
sel_port-260: 1.1.sta01563
show_events: 1
show_log: 0
port_sorting: 2
kpi_id: WiFi Capacity
bg: 0xE0ECF8
test_rig:
show_scan: 1
auto_helper: 1
skip_2: 0
skip_5: 0
batch_size: 1,5,10,20,40,80
loop_iter: 1
duration: 30000
test_groups: 0
test_groups_subset: 0
protocol: TCP-IPv4
dl_rate_sel: Total Download Rate:
dl_rate: 1000000000
ul_rate_sel: Total Upload Rate:
ul_rate: 1000000000
prcnt_tcp: 100000
l4_endp:
pdu_sz: -1
mss_sel: 1
sock_buffer: 0
ip_tos: 0
multi_conn: -1
min_speed: -1
ps_interval: 60-second Running Average
fairness: 0
naptime: 0
before_clear: 5000
rpt_timer: 1000
try_lower: 0
rnd_rate: 1
leave_ports_up: 0
down_quiesce: 0
udp_nat: 1
record_other_ssids: 0
clear_reset_counters: 0
do_pf: 0
pf_min_period_dl: 128000
pf_min_period_ul: 0
pf_max_reconnects: 0
use_mix_pdu: 0
pdu_prcnt_pps: 1
pdu_prcnt_bps: 0
pdu_mix_ln-0:
show_scan: 1
show_golden_3p: 0
save_csv: 0
show_realtime: 1
show_pie: 1
show_per_loop_totals: 1
show_cx_time: 1
show_dhcp: 1
show_anqp: 1
show_4way: 1
show_latency: 1