Skip to content

Commit 301b306

Browse files
committed
DPL: fix quoting environment
Since we use putenv, there is no need to provide a quoted string.
1 parent aab7571 commit 301b306

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Framework/Core/src/DeviceSpecHelpers.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,9 +1182,9 @@ void DeviceSpecHelpers::prepareArguments(bool defaultQuiet, bool defaultStopped,
11821182
if (preload == nullptr || strcmp(preload, "libSegFault.so") == 0) {
11831183
tmpEnv.push_back("LD_PRELOAD=libSegFault.so");
11841184
} else {
1185-
tmpEnv.push_back(fmt::format("LD_PRELOAD=\"{}:libSegFault.so\"", preload));
1185+
tmpEnv.push_back(fmt::format("LD_PRELOAD={}:libSegFault.so", preload));
11861186
}
1187-
tmpEnv.push_back(fmt::format("SEGFAULT_SIGNALS=\"{}\"", varmap["stacktrace-on-signal"].as<std::string>()));
1187+
tmpEnv.push_back(fmt::format("SEGFAULT_SIGNALS={}", varmap["stacktrace-on-signal"].as<std::string>()));
11881188
}
11891189

11901190
// options can be grouped per processor spec, the group is entered by

Framework/Core/test/test_FrameworkDataFlowToDDS.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,16 @@ BOOST_AUTO_TEST_CASE(TestDDS)
120120
dumpDeviceSpec2DDS(ss, "", devices, executions, command);
121121
auto expected = R"EXPECTED(<topology name="o2-dataflow">
122122
<decltask name="A">
123-
<exe reachable="true">foo | LD_PRELOAD=libSegFault.so SEGFAULT_SIGNALS="all" foo --id A_dds%TaskIndex%_%CollectionIndex% --shm-monitor false --log-color false --color false --early-forward-policy never --jobs 4 --severity info --shm-allocation rbtree_best_fit --shm-mlock-segment false --shm-mlock-segment-on-creation false --shm-segment-id 0 --shm-throw-bad-alloc true --shm-zero-segment false --stacktrace-on-signal all --timeframes-rate-limit 0 --channel-config "name=from_A_to_B,type=push,method=bind,address=ipc://@localhostworkflow-id_22000,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --channel-config "name=from_A_to_C,type=push,method=bind,address=ipc://@localhostworkflow-id_22001,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --session dpl_workflow-id --plugin odc</exe>
123+
<exe reachable="true">foo | LD_PRELOAD=libSegFault.so SEGFAULT_SIGNALS=all foo --id A_dds%TaskIndex%_%CollectionIndex% --shm-monitor false --log-color false --color false --early-forward-policy never --jobs 4 --severity info --shm-allocation rbtree_best_fit --shm-mlock-segment false --shm-mlock-segment-on-creation false --shm-segment-id 0 --shm-throw-bad-alloc true --shm-zero-segment false --stacktrace-on-signal all --timeframes-rate-limit 0 --channel-config "name=from_A_to_B,type=push,method=bind,address=ipc://@localhostworkflow-id_22000,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --channel-config "name=from_A_to_C,type=push,method=bind,address=ipc://@localhostworkflow-id_22001,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --session dpl_workflow-id --plugin odc</exe>
124124
</decltask>
125125
<decltask name="B">
126-
<exe reachable="true">foo | LD_PRELOAD=libSegFault.so SEGFAULT_SIGNALS="all" foo --id B_dds%TaskIndex%_%CollectionIndex% --shm-monitor false --log-color false --color false --early-forward-policy never --jobs 4 --severity info --shm-allocation rbtree_best_fit --shm-mlock-segment false --shm-mlock-segment-on-creation false --shm-segment-id 0 --shm-throw-bad-alloc true --shm-zero-segment false --stacktrace-on-signal all --timeframes-rate-limit 0 --channel-config "name=from_B_to_D,type=push,method=bind,address=ipc://@localhostworkflow-id_22002,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --channel-config "name=from_A_to_B,type=pull,method=connect,address=ipc://@localhostworkflow-id_22000,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --session dpl_workflow-id --plugin odc</exe>
126+
<exe reachable="true">foo | LD_PRELOAD=libSegFault.so SEGFAULT_SIGNALS=all foo --id B_dds%TaskIndex%_%CollectionIndex% --shm-monitor false --log-color false --color false --early-forward-policy never --jobs 4 --severity info --shm-allocation rbtree_best_fit --shm-mlock-segment false --shm-mlock-segment-on-creation false --shm-segment-id 0 --shm-throw-bad-alloc true --shm-zero-segment false --stacktrace-on-signal all --timeframes-rate-limit 0 --channel-config "name=from_B_to_D,type=push,method=bind,address=ipc://@localhostworkflow-id_22002,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --channel-config "name=from_A_to_B,type=pull,method=connect,address=ipc://@localhostworkflow-id_22000,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --session dpl_workflow-id --plugin odc</exe>
127127
</decltask>
128128
<decltask name="C">
129-
<exe reachable="true">foo | LD_PRELOAD=libSegFault.so SEGFAULT_SIGNALS="all" foo --id C_dds%TaskIndex%_%CollectionIndex% --shm-monitor false --log-color false --color false --early-forward-policy never --jobs 4 --severity info --shm-allocation rbtree_best_fit --shm-mlock-segment false --shm-mlock-segment-on-creation false --shm-segment-id 0 --shm-throw-bad-alloc true --shm-zero-segment false --stacktrace-on-signal all --timeframes-rate-limit 0 --channel-config "name=from_C_to_D,type=push,method=bind,address=ipc://@localhostworkflow-id_22003,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --channel-config "name=from_A_to_C,type=pull,method=connect,address=ipc://@localhostworkflow-id_22001,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --session dpl_workflow-id --plugin odc</exe>
129+
<exe reachable="true">foo | LD_PRELOAD=libSegFault.so SEGFAULT_SIGNALS=all foo --id C_dds%TaskIndex%_%CollectionIndex% --shm-monitor false --log-color false --color false --early-forward-policy never --jobs 4 --severity info --shm-allocation rbtree_best_fit --shm-mlock-segment false --shm-mlock-segment-on-creation false --shm-segment-id 0 --shm-throw-bad-alloc true --shm-zero-segment false --stacktrace-on-signal all --timeframes-rate-limit 0 --channel-config "name=from_C_to_D,type=push,method=bind,address=ipc://@localhostworkflow-id_22003,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --channel-config "name=from_A_to_C,type=pull,method=connect,address=ipc://@localhostworkflow-id_22001,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --session dpl_workflow-id --plugin odc</exe>
130130
</decltask>
131131
<decltask name="D">
132-
<exe reachable="true">foo | LD_PRELOAD=libSegFault.so SEGFAULT_SIGNALS="all" foo --id D_dds%TaskIndex%_%CollectionIndex% --shm-monitor false --log-color false --color false --early-forward-policy never --jobs 4 --severity info --shm-allocation rbtree_best_fit --shm-mlock-segment false --shm-mlock-segment-on-creation false --shm-segment-id 0 --shm-throw-bad-alloc true --shm-zero-segment false --stacktrace-on-signal all --timeframes-rate-limit 0 --a-param 1 --b-param "" --c-param "foo;bar" --channel-config "name=from_B_to_D,type=pull,method=connect,address=ipc://@localhostworkflow-id_22002,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --channel-config "name=from_C_to_D,type=pull,method=connect,address=ipc://@localhostworkflow-id_22003,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --session dpl_workflow-id --plugin odc</exe>
132+
<exe reachable="true">foo | LD_PRELOAD=libSegFault.so SEGFAULT_SIGNALS=all foo --id D_dds%TaskIndex%_%CollectionIndex% --shm-monitor false --log-color false --color false --early-forward-policy never --jobs 4 --severity info --shm-allocation rbtree_best_fit --shm-mlock-segment false --shm-mlock-segment-on-creation false --shm-segment-id 0 --shm-throw-bad-alloc true --shm-zero-segment false --stacktrace-on-signal all --timeframes-rate-limit 0 --a-param 1 --b-param "" --c-param "foo;bar" --channel-config "name=from_B_to_D,type=pull,method=connect,address=ipc://@localhostworkflow-id_22002,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --channel-config "name=from_C_to_D,type=pull,method=connect,address=ipc://@localhostworkflow-id_22003,transport=shmem,rateLogging=0,rcvBufSize=1,sndBufSize=1" --session dpl_workflow-id --plugin odc</exe>
133133
</decltask>
134134
<declcollection name="DPL">
135135
<tasks>

0 commit comments

Comments
 (0)