Friday 26 May 2017

What is new in FWTS 17.05.00?

Version 17.05.00 of the Firmware Test Suite was released this week as part of  the regular end-of-month release cadence. So what is new in this release?
  • Alex Hung has been busy bringing the SMBIOS tests in-sync with the SMBIOS 3.1.1 standard
  • IBM provided some OPAL (OpenPower Abstraction Layer) Firmware tests:
    • Reserved memory DT validation tests
    • Power management DT Validation tests
  • The first fwts snap was created
  •  Over 40 bugs were fixed
As ever, we are grateful for all the community contributions to FWTS.  The full release details are available from the fwts-devel mailing list.

I expect that the next upcoming ACPICA release will be integrated into the 17.06.00 FWTS release next month.

Monday 15 May 2017

Firmware Test Suite Text Based Front-End

The Firmware Test Suite (FWTS) has an easy to use text based front-end that is primarily used by the FWTS Live-CD image but it can also be used in the Ubuntu terminal.

To install and run the front-end use:

 sudo apt-get install fwts-frontend  
 sudo fwts-frontend-text  

..and one should see a menu of options:

In this demonstration, the "All Batch Tests" option has been selected:

Tests will be run one by one and a progress bar shows the progress of each test. Some tests run very quickly, others can take several minutes depending on the hardware configuration (such as number of processors).

Once the tests are all complete, the following dialogue box is displayed:

The test has saved several files into the directory /fwts/15052017/1748/ and selecting Yes one can view the results log in a scroll-box:

Exiting this, the FWTS frontend dialog is displayed:

Press enter to exit (note that the Poweroff option is just for the fwts Live-CD image version of fwts-frontend).

The tool dumps various logs, for example, the above run generated:

 ls -alt /fwts/15052017/1748/  
 total 1388  
 drwxr-xr-x 5 root root  4096 May 15 18:09 ..  
 drwxr-xr-x 2 root root  4096 May 15 17:49 .  
 -rw-r--r-- 1 root root 358666 May 15 17:49 acpidump.log  
 -rw-r--r-- 1 root root  3808 May 15 17:49 cpuinfo.log  
 -rw-r--r-- 1 root root 22238 May 15 17:49 lspci.log  
 -rw-r--r-- 1 root root 19136 May 15 17:49 dmidecode.log  
 -rw-r--r-- 1 root root 79323 May 15 17:49 dmesg.log  
 -rw-r--r-- 1 root root  311 May 15 17:49 README.txt  
 -rw-r--r-- 1 root root 631370 May 15 17:49 results.html  
 -rw-r--r-- 1 root root 281371 May 15 17:49 results.log  

acpidump.log is a dump of the ACPI tables in format compatible with the ACPICA acpidump tool.  The results.log file is a copy of the results generated by FWTS and results.html is a HTML formatted version of the log.

Monday 8 May 2017

Simple job scripting in stress-ng 0.08.00

The latest release of stress-ng 0.08.00 now contains a new job scripting feature. Jobs allow one to bundle up a set of stress options  into a script rather than cram them all onto the command line.  One can now also run multiple invocations of a stressor with the latest version of stress-ng and conbined with job scripts we now have a powerful way of running more complex stress tests.

The job script commands are essentially the stress-ng long options without the need for the '--' option characters.  One option per line is allowed.

For example:

 $ stress-ng --cpu 1 --matrix 1 --verbose --tz --timeout 60s --cpu 1 --matrix -1 --icache 1 

would become:

 $cat example.job  
 timeout 60  
 cpu 1  
 matrix 1  
 icache 1  

One can also add comments using the # character prefix.   By default the stressors will be run in parallel, but one can use the "run sequential" command in the job script to run the stressors sequentially.

The following script runs the mmap stressor multiple times using more memory on each run:

 $ cat mmap.job  
 run sequential # one job at a time  
 timeout 2m   # run for 2 minutes  
 verbose     # verbose output  
 # run 4 invocations and increase memory each time  
 mmap 1  
 mmap-bytes 25%  
 mmap 1  
 mmap-bytes 50%  
 mmap 1  
 mmap-bytes 75%  
 mmap 1  
 mmap-bytes 100%  

Some of the stress-ng stressors have various "methods" that allow one to modify the way the stressor behaves.  The following example shows how job scripts can be uses to exercise a system using different stressor methods:

 $ cat /usr/share/stress-ng/example-jobs/matrix-methods.job   
 # hot-cpu class stressors:  
 #  various options have been commented out, one can remove the  
 #  proceeding comment to enable these options if required.  
 # run the following tests in parallel or sequentially  
 run sequential  
 # run parallel  
 # verbose  
 #  show all debug, warnings and normal information output.  
 # run each of the tests for 60 seconds  
 # stop stress test after N seconds. One can also specify the units  
 # of time in seconds, minutes, hours, days or years with the suf‐  
 # fix s, m, h, d or y.  
 timeout 1m  
 # tz  
 #  collect temperatures from the available thermal zones on the  
 #  machine (Linux only). Some devices may have one or more thermal  
 #  zones, where as others may have none.  
 # matrix stressor with examples of all the methods allowed  
 #  start N workers that perform various matrix operations on float‐  
 #  ing point values. By default, this will exercise all the matrix  
 #  stress methods one by one. One can specify a specific matrix  
 #  stress method with the --matrix-method option.  
 # Method      Description  
 # all       iterate over all the below matrix stress methods  
 # add       add two N × N matrices  
 # copy       copy one N × N matrix to another  
 # div       divide an N × N matrix by a scalar  
 # hadamard     Hadamard product of two N × N matrices  
 # frobenius    Frobenius product of two N × N matrices  
 # mean       arithmetic mean of two N × N matrices  
 # mult       multiply an N × N matrix by a scalar  
 # prod       product of two N × N matrices  
 # sub       subtract one N × N matrix from another N × N matrix  
 # trans      transpose an N × N matrix  
 matrix 0  
 matrix-method all  
 matrix 0  
 matrix-method add  
 matrix 0  
 matrix-method copy  
 matrix 0  
 matrix-method div  
 matrix 0  
 matrix-method frobenius  
 matrix 0  
 matrix-method hadamard  
 matrix 0  
 matrix-method mean  
 matrix 0  
 matrix-method mult  
 matrix 0  
 matrix-method prod  
 matrix 0  
 matrix-method sub  
 matrix 0  
 matrix-method trans  

Various example job scripts can be found in /usr/share/stress-ng/example-job, one can use these as a base for writing more complex stressors.  The example jobs have all the options commented (using the text from the stress-ng manual) to make it easier to see how each stressor can be run.

Version 0.08.00 landed in Ubuntu 17.10 Artful Aardvark and is available as a snap and I've got backports in ppa:colin-king/white for older releases of Ubuntu.