Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labs/lab-11: Add checker infrastructure #44

Open
teodutu opened this issue Feb 21, 2025 · 0 comments
Open

labs/lab-11: Add checker infrastructure #44

teodutu opened this issue Feb 21, 2025 · 0 comments
Assignees

Comments

@teodutu
Copy link

teodutu commented Feb 21, 2025

Follow the structure in this task [1] to create tests for the following tasks:

entry-fix-1
entry-fix-2
export-fix
include-fix
lib-fix
multiple-link
obj-link-dev
single-link
var-func-fix
vars-obs

The students should just run make check in tasks/<task-name>/tests/ and receive the output of each test + the total number of points out of 100.

Steps to solve this:

  1. Add the test harness files in the task-name/tests folder. The Makefile there should compile the code in ../support. The scripts below should get the output from running the compiled code and then compare it with some predefined values. Let's suppose a task has the following files:

    task-name/
    |-- support/
    |   |-- Makefile
    |   `-- main.c
    `-- solution/
        |-- Makefile
        `-- main.c
    

    This hierarchy should be changed as follows:

    task-name/
    |-- support/                # Unchanged
    |-- solution/               # Unchanged
    `-- tests/
        |-- Makefile            # Compiles the code in `support/` and runs run_all_test.sh
        |-- graded_test.inc.sh  # Boilerplate code for testing and printing. Required by every task
        |-- run_all_tets.sh     # Generic test runner
        `-- test.sh             # Contains tests for the tasks in ../support/main.c
    
  2. Add a description to the task's README.md file about running the checker together with a full run that obtains 100 points, like so [2].

Refer to [1] for more information about the content of each file in tests/.
Read the contributor guidelines before making contributions [3].
Add Fixes #44 at the end of your commit message to automatically link your PR with this issue.

[1] https://github.com/cs-pub-ro/operating-systems/tree/main/chapters/data/memory-security/drills/tasks/stack-protector/solution/tests
[2] https://github.com/cs-pub-ro/operating-systems/blob/5db2ced28419f274cad0e0e6dab2ab2bb18de1f9/chapters/data/memory-security/drills/tasks/exec-shellcode/README.md?plain=1#L19-L40
[3] https://github.com/cs-pub-ro/hardware-software-interface/blob/main/CONTRIBUTING.md#pull-requests

@mateistanuca1 mateistanuca1 self-assigned this Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants