1. Setup VM with:
CPU - 4
Memory - 8GB
Hard disk - 100GB
Have to use DEBUG build, where we have debug macro
Setup process is described in this instruction.
Note : If you already created dilos_BASE BE according the instruction, and there is no any new tested stable version, just execute the following command:
beadm activate dilos_BASE
In other case if you have already the dilos_ISO_orig BE - make the command:
beadm activate dilos_ISO_orig
Then reboot and start the instruction from the section Step 6. Prepare VM for Tests Running:
reboot
If you have no one of these 2 BEs then start the instruction from the beginning.
Note : Create ztest user if you forgot to do it according the instruction:
sudo useradd -m -d /var/ztest -g staff -s /bin/bash ztest
sudo passwd ztest
echo "ztest ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers.d/ztest
2. Install packages for net tests:
Note : If you already did it on the previous step when preparing VM to run, then you can skip this step and go to the next one.
sudo apt update apt install testrunner python3 build-essential screen apt install system-test-utiltest libjedec1 libdemangle-sys1 diagnostic-pci apt install system-test-libctest system-test-elftest system-test-ostest system-test-nettest
3. Login by user ztest and create zones:
Zones must be created according to the file:
/opt/net-tests/config/ip_forwarding.config
Currently accepted names: cz, sz, rz
Important! Zones must be placed to the /zones
directory like dhcp zone.
You can use the installation script or do the following steps.
First configure and install template zones cz-orig, sz-orig and rz-orig, from which test zones will be created later:
ztest@dilos:~# cat > cz-orig.cfg <<EOT create set zonepath=/zones/cz-orig set autoboot=false set ip-type=exclusive add net set physical=int1 set global-nic="vsw0" add property (name="ip",value="dhcp") add property (name="primary",value="true") end commit exit EOT ztest@dilos:~# sudo zonecfg -z cz-orig -f cz-orig.cfg && sudo zoneadm -z cz-orig install ztest@dilos:~# cat > sz-orig.cfg <<EOT create set zonepath=/zones/sz-orig set autoboot=false set ip-type=exclusive add net set physical=int2 set global-nic="vsw0" add property (name="ip",value="dhcp") add property (name="primary",value="true") end commit exit EOT ztest@dilos:~# sudo zonecfg -z sz-orig -f sz-orig.cfg && sudo zoneadm -z sz-orig install ztest@dilos:~# cat > rz-orig.cfg <<EOT create set zonepath=/zones/rz-orig set autoboot=false set ip-type=exclusive add net set physical=int3 set global-nic="vsw0" add property (name="ip",value="dhcp") add property (name="primary",value="true") end commit exit EOT ztest@dilos:~# sudo zonecfg -z rz-orig -f rz-orig.cfg && sudo zoneadm -z rz-orig install
Now configure test zones. The following is the configuration for the cz zone:
ztest@dilos:~# cat > cz.cfg <<EOT create set zonepath=/zones/cz set autoboot=false set ip-type=exclusive add net set physical=int1 set global-nic="vsw0" add property (name="ip",value="dhcp") add property (name="primary",value="true") end commit exit EOT ztest@dilos:~# sudo zonecfg -z cz -f cz.cfg
For other zones settings will be the same. For the sz zone:
ztest@dilos:~# cat > sz.cfg <<EOT create set zonepath=/zones/sz set autoboot=false set ip-type=exclusive add net set physical=int2 set global-nic="vsw0" add property (name="ip",value="dhcp") add property (name="primary",value="true") end commit exit EOT ztest@dilos:~# sudo zonecfg -z sz -f sz.cfg
and for the rz zone:
ztest@dilos:~# cat > rz.cfg <<EOT create set zonepath=/zones/rz set autoboot=false set ip-type=exclusive add net set physical=int3 set global-nic="vsw0" add property (name="ip",value="dhcp") add property (name="primary",value="true") end commit exit EOT ztest@dilos:~# sudo zonecfg -z rz -f rz.cfg
Install the socat package for every template zone
The zones have not configured net, need to install it from the global zone. Download the package inside the global zone:
apt download socat
(for the current version, the name of the downloaded file is socat_1.7.3.1-2+deb9u1+dilos2_solaris-i386.deb
) and install it into the zones:
sudo apt -y -o Dir=/zones/cz-orig/root update sudo apt -y -o Dir=/zones/cz-orig/root upgrade sudo dpkg -i --root=/zones/cz-orig/root socat_1.7.3.1-2+deb9u1+dilos2_solaris-i386.deb sudo apt -y -o Dir=/zones/sz-orig/root update sudo apt -y -o Dir=/zones/sz-orig/root upgrade sudo dpkg -i --root=/zones/sz-orig/root socat_1.7.3.1-2+deb9u1+dilos2_solaris-i386.deb sudo apt -y -o Dir=/zones/rz-orig/root update sudo apt -y -o Dir=/zones/rz-orig/root upgrade sudo dpkg -i --root=/zones/rz-orig/root socat_1.7.3.1-2+deb9u1+dilos2_solaris-i386.deb sudo reboot
4. Login by user ztest and run tests
Copy the attached stability-test.sh to your test VM. Then check that dhcp zone and server are running after reboot and run tests.
The test script could be run in 3 modes:
for a specific number of iterations
In this case you have to put the -i option and enter the number of iterations, for example, to set 10 iterations:
./stability-test.sh -i 10
to work for the specific period of time
In this case you have to put the -d option and enter the time duration in the HH:MM[:SS] format, for example, to work for 10 hours and 15 minutes:
./stability-test.sh -d 10:15
or, for example to work for 20 seconds:
./stability-test.sh -d 00:00:20
and finally to stop at the specified date and time
In this case you have to put the -t and enter the date and time of stop in the HH:MM[:SS] [DAY-MONTH_YEAR] format, for example, to work from the start to 17:00 of 8th of August 2023 year you will enter:
./stability-test.sh -t 17:00 8-AUG-2023
If date is omitted, and only time is entered, it’s supposed that date is the current one. I.e. to stop today at 19:00 you will enter:
./stability-test.sh -t 19:00
You can run tests not only sequentially but randomly as well. To do this you have put the -s option at he end of command line, for example:
./stability-test.sh -d 00:00:20 -s
And finally you can run one specific test instead of the whole set. To do this you have to put its name at the end of the command line. The name can be one of libc, elf, os, util or net, for example:
./stability-test.sh -d 00:00:20 elf
Note : The -s option and the test name are mutually exclusive, you can’t use them together.
And now after script is finished the common logs will be placed to /var/tmp/elf-stability.<ISO TIME>.txt, /var/tmp/libc-stability.<ISO TIME>.txt, /var/tmp/os-stability.<ISO TIME>.txt, /var/tmp/util-stability.<ISO TIME>.txt and /var/tmp/net-stability.<ISO TIME>.txt files. And you will find logs about separate cycles in elf.<N>.txt, libc-test.<N>.txt, ostest-test.<N>.txt, util-test.<N>.txt and net-test.<N>.txt form in the /var/tmp folder, where <N> - is a cycle number.