From da09e1d8acfbc1bf1b467d9aceaed6ddf060ac29 Mon Sep 17 00:00:00 2001
From: Davide Cristoforetti <dcristof@gputest-genoa-01.cms>
Date: Thu, 29 Aug 2024 17:00:12 +0200
Subject: [PATCH] Added bash script to automatically allocate memory

---
 test/testing_scripts/allocate_memory.sh | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100755 test/testing_scripts/allocate_memory.sh

diff --git a/test/testing_scripts/allocate_memory.sh b/test/testing_scripts/allocate_memory.sh
new file mode 100755
index 00000000..ea5594f2
--- /dev/null
+++ b/test/testing_scripts/allocate_memory.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+
+scdaq_data_path="/home/dcristof/scdaq/test/data/run000000/in_progress" 
+famfs_path="/home/dcristof/famfs/debug/famfs" 
+mnt_path="/mnt/famfs/run000000/in_progress/"
+
+sudo rm -rf "$mnt_path"/*
+
+for file in "$scdaq_data_path"/*; do
+  filesize=$(stat -c%s "$file")
+  filename=$(basename "$file")
+  echo "${filename}: ${filesize} bytes"
+  sudo $famfs_path creat -s $filesize "$mnt_path$filename"
+
+
+done
+
+ls -las $mnt_path
+
+
-- 
GitLab