-
Notifications
You must be signed in to change notification settings - Fork 15
Run basic tests with genwqe_test_gz
genwqe_test_gz is a script which uses the GenWQE specific version of gzip/gunzip to test the correctly functionality of the card. It compresses some data, decompresses it again and compares the results against the original data. It complains if the result is not matching. To stress the card and the device-driver the script will start those operations in parallel.
You need to know which kind of hardware accelerator you are using. The script currently support our GENWQE/PCIe and the CAPI version of our FPGA card. Use -A to set the right hardware accelerator. You can test one card individually e.g. -C0 for card 0, or you can distribute the load automatically to the available cards of one accelerator type. Mixing accelerators is not supported.
[haver@tul1g5 ~]$ genwqe_test_gz -AGENWQE -C1
Checking if /usr/bin/genwqe/gzip is there ... ok
Checking if /usr/bin/genwqe/gunzip is there ... ok
Testdata "/usr/share/testdata/testdata.tar.gz" is missing. Please install it first.
E.g.:
wget http://corpus.canterbury.ac.nz/resources/cantrbry.tar.gz
sudo mkdir -p /usr/share/testdata/
sudo cp cantrbry.tar.gz /usr/share/testdata/testdata.tar.gz
[haver@tul1g5 ~]$ sudo mkdir -p /usr/share/testdata/
[haver@tul1g5 ~]$ sudo cp cantrbry.tar.gz /usr/share/testdata/testdata.tar.gz
The script expects the test data at /usr/share/testdata/testdata.tar.gz. Copy some meaningful data into that location before you start the test. E.g. by following the instructions printed out once no data is found. You can use your own data or use an example file, just like shown above.
[haver@tul1g5 ~]$ genwqe_test_gz -AGENWQE -C0
Checking if /usr/bin/genwqe/gzip is there ... ok
Checking if /usr/bin/genwqe/gunzip is there ... ok
Without -v the test is pretty silent. Check $? to be 0 for success. If the test-case fails, it will starting to complain. Here a run with -v set:
[haver@tul1g5 ~]$ genwqe_test_gz -AGENWQE -C0 -v
Checking if /usr/bin/genwqe/gzip is there ... ok
Checking if /usr/bin/genwqe/gunzip is there ... ok
Preparing data...
Waiting for jobs to terminate ...
Runtime: 0:0:30 [H:M:S]
Cleaning up source data...
Done
And finally the verbose version with -vv:
[haver@tul1g5 ~]$ genwqe_test_gz -AGENWQE -C0 -vv
Checking if /usr/bin/genwqe/gzip is there ... ok
Checking if /usr/bin/genwqe/gunzip is there ... ok
Preparing data...
NewPID: 3294
RunPIDs: 3294
NewPID: 3295
RunPIDs: 3294 3295
NewPID: 3296
RunPIDs: 3294 3295 3296
...
Waiting for jobs to terminate ...
Run #1/Instance_4 : unpacking, packing, comparing...
Run #1/Instance_5 : unpacking, packing, comparing...
Run #1/Instance_10 : unpacking, packing, comparing...
...
Run #99/Instance_7 : unpacking, packing, comparing...
Run #100/Instance_5 : unpacking, packing, comparing...
Run #100/Instance_7 : unpacking, packing, comparing...
Runtime: 0:0:29 [H:M:S]
Cleaning up source data...
Done