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.
- 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
- Clone the tester:
git clone git@github.com:VICXPTRV/philotester.git
cd philotester- Configure the tester using
configfile:- Update
EXEC_PATHto point to your philo project - Optionally update other variables
- Update
./philotester [options] [cases...]./philotester random./philotester invalid_inputOptions
-mRun with valgrind memcheck-hRun with valgrind helgrind-sRun with thread sanitizer-pPrompt manual input-HDisplay help message-dDebug tester itself
./philotester -h random./philotester -m randomAll 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
- All logs are in
logs/directory - Automatic cleanup between runs
