improved test_tmpfs to delete the stresser file if it alraeady exists when launching the test

This commit is contained in:
Guillaume Raffy 2024-08-13 17:37:40 +02:00
parent 9cedff0deb
commit f800d77200
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ def measure_tmpfs_impact(file_size_in_mib: int):
'''measures the effect of tmpfs file on meminfo variables
'''
stresser_file_path = Path('/dev/shm/tmpfs-stresser.bin')
if stresser_file_path.exists():
stresser_file_path.unlink()
ramana_out_root = Path('./ramana-out')
ramana_out_root.mkdir(exist_ok=True)