Code Monkey home page Code Monkey logo

os_hw4_tests's Introduction

About

The test.c file in this repo tests the functions defined in your queue.c implementation. Most of the test functions were generated using ChatGPT 3.5 and manually fine-tuned to suit the assignment specifications. These tests are subject to change in the near future. Please make sure you are working with the most recent version of them. It is not recommended to clone this repo before you are actually ready to carry out the tests. Please note that passing the tests in their current form does not guarantee that your code meets all of the requirements! Similarly, unexpected behavior or failed tests do not necessarily mean that your code does not meet the requirements! These tests are a work in progress.

How to use the automated tests

  1. Clone this repository and copy your queue.c file into the resulting folder.
  2. Compile your code along with the test file using gcc -O3 -D_POSIX_C_SOURCE=200809 -Wall -std=c11 -pthread test.c -o test -g.
  3. Run ./test.
  4. Optional: For more detailed logs, particularly information about threads, install gdb (run sudo apt-get update, then sudo apt-get install gdb). After installing gdb, run gdb ./test, hit the Enter key, then run your code by typing "run" and hitting the Enter key again.
  5. Part of the function test_edge_cases() is commented out. After running the tests without it, comment it in and make sure it block execution (this is the expected behavior). You can, of course, comment it back out if you wish to run the other tests again.

Contributing

These tests are by no means comprehensive. There are definitely edge cases that I haven't thought of or have yet to add tests for. Contributions would be very much appreciated. Feel free to submit a PR or to reach out to me.

To-do:

  • Verify correctness of test_multiconcurrent_enqueue_dequeue() or make adjustments
  • Concurrent random sequences of queue operations
  • Automatically verify correct thread ordering

os_hw4_tests's People

Contributors

jhyahav avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.