Skip to content

VICXPTRV/philotester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

philotester 🥢

A testing suite for the Dining Philosophers project

Warning

This may be buggy. Do not fully trust the results. Always check the logs for verification.

Features

  • Norminette: Ensures code adheres to coding standards
  • Compilation: Builds the project before testing
  • Memory Leaks: Detects leaks using Valgrind
  • Race Conditions: Detects issues with Helgrind and TSAN
  • Test Cases: Predefined scenarios in the cases/ directory
  • Performance: Measures system performance

Installation

  1. Clone the tester:
git clone git@github.com:VICXPTRV/philotester.git
cd philotester
  1. Configure the tester using config file:
    • Update EXEC_PATH to point to your philo project
    • Optionally update other variables

Usage

./philotester [options] [cases...]
./philotester random
./philotester invalid_input

Options

  • -m Run with valgrind memcheck
  • -h Run with valgrind helgrind
  • -s Run with thread sanitizer
  • -p Prompt manual input
  • -H Display help message
  • -d Debug tester itself
./philotester -h random
./philotester -m random

Test Example

Adding New Test Cases

All test cases are stored in the cases/ directory. You can change existing case or add new one

Test case format:

number_of_philosophers time_to_die time_to_eat time_to_sleep meal_count

Example:

3 400 200 200 2
1 400 200 200

Logs

  • All logs are in logs/ directory
  • Automatic cleanup between runs

About

Tester for the Dining Philosophers project

Resources

Stars

Watchers

Forks

Contributors

Languages