v2.3 Autograder testing fully supported
In this release is included:
- A
qemubinary which has a popcount hardware device, an MMIO interface and a xilinx AXIDMA hardware interface - Kernel module to handle
mmaping requirements for theUIOpopcount device - Compiled
linux-5.10.4.zImagekernel image - e2fs filesystem with the required binary files to run and test student
user_mmio.canduser_dma.cfiles - Makefile with the necessary commands to run said tests
This is all in an effort to streamline the grading process for projects 5 and 7.
This release should be fully stable for the solutions, and simply require the current setup of p5 and p7 in the autograder to run.
To set this image up on the autograder
- download the
Dockerfilefrom the repository. To do this, either download manually from github, or run:
wget https://raw.githubusercontent.com/Engr315/Popcount_Autograder/main/Dockerfile- Go to the project sandbox images, and upload the dockerfile, and build from this dockerfile.
- To setup the testing environment, follow the setup from P5 and P7 currently in the autograder, or see below for details on how to run tests
Running Tests.
To run the tests, the following commands must be run in the autograder.
To setup and run the tests, simply:
Begin by moving the student user_<mmio,dma>.c file to the qcomps directory:
mv *.c qcomps/Then, move into the qcomps directory:
cd qcomps/Next, simply run the make result target:
For MMIO:
make result TEST=mmiofor DMA
make result TEST=dmaThis generates the file result which contains which file was tested, the popcount result, and the time of execution.
Next, to test the result and confirm correctness, run:
make test TEST_FILE=<zeros.bin,ones.bin,tiny.bin,small.bin,medium.bin,large.bin>This will check to see if the number of ones counted in each of those files matches ground truth.
Finally, to check the time of the command to confirm that dma was used (it will be faster than MMIO in every case so long as the student code is suitably decent and does not contain any glaring issues), run:
make test_time TEST_TIME=<value>where value is what ever a decent mid value time is on the system. In the autograder, for our purposes value=1 seems to work well, but your performance may differ.