diff --git a/.github/workflows/memcheck.yml b/.github/workflows/memcheck.yml index a97ee3d654..4f347f21ba 100644 --- a/.github/workflows/memcheck.yml +++ b/.github/workflows/memcheck.yml @@ -142,6 +142,21 @@ jobs: SN_LOG: "all" timeout-minutes: 30 + - name: Check current files + run: ls -la + - name: Check safenode file + run: ls /home/runner/work/safe_network/safe_network/target/release + + - name: Check there was no restart issues + run: | + if rg 'Failed to execute hard-restart command' $NODE_DATA_PATH; then + echo "Restart issues detected" + exit 1 + else + echo "No restart issues detected" + fi + + - name: Verify the routing tables of the nodes run: cargo test --release -p sn_node --test verify_routing_table -- --nocapture env: diff --git a/sn_networking/src/record_store.rs b/sn_networking/src/record_store.rs index bafc1c73f4..3fd26c81d7 100644 --- a/sn_networking/src/record_store.rs +++ b/sn_networking/src/record_store.rs @@ -983,9 +983,15 @@ mod tests { // Execute for 50 iterations, which allows the test can be executed in normal CI runs. if iteration == 50 { - assert_eq!(0, empty_earned_nodes); - assert!((max_store_cost / min_store_cost) < 60); - assert!((max_earned / min_earned) < 800); + assert_eq!(0, empty_earned_nodes, "every node has earnt _something_"); + assert!( + (max_store_cost / min_store_cost) < 60, + "store cost is balanced" + ); + assert!( + (max_earned / min_earned) < 800, + "earning distribution is well balanced" + ); break; } } diff --git a/sn_node/src/bin/safenode/main.rs b/sn_node/src/bin/safenode/main.rs index 5f6ae96f7c..6414fa680c 100644 --- a/sn_node/src/bin/safenode/main.rs +++ b/sn_node/src/bin/safenode/main.rs @@ -502,6 +502,24 @@ fn start_new_node_process() { let args: Vec = env::args().collect(); info!("Original args are: {args:?}"); + info!("Current exe is: {current_exe:?}"); + + // Convert current exe path to string, log an error and return if it fails + let current_exe = match current_exe.to_str() { + Some(s) => { + // remove "(deleted)" string from current exe path + if s.contains(" (deleted)") { + warn!("The current executable path contains ' (deleted)', which may lead to unexpected behavior. This has been removed from the exe location string"); + s.replace(" (deleted)", "") + } else { + s.to_string() + } + } + None => { + error!("Failed to convert current executable path to string"); + return; + } + }; // Create a new Command instance to run the current executable let mut cmd = Command::new(current_exe);