Skip to content

Commit 0463f94

Browse files
committed
testsuite: check LD_LIBRARY_PATH for pmi
Problem: no tests verify that LD_LIBRARY_PATH is set properly by the simple pmi shell plugin. Add some tests. Drop a test in t3001-mpi-personalities.t that was ensuring LD_LIBRARY_PATH was not being set.
1 parent 90f8b99 commit 0463f94

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

t/t3001-mpi-personalities.t

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ run_program() {
1616
run_timeout $timeout flux run $OPTS -n${ntasks} -N${nnodes} $*
1717
}
1818

19-
test_expect_success 'LD_LIBRARY_PATH is not being set by MPI personalties' '
20-
test_must_fail flux run --env-remove=* printenv LD_LIBRARY_PATH
21-
'
22-
2319
test_expect_success NO_ASAN "spectrum mpi only enabled with option" '
2420
LD_PRELOAD_saved=${LD_PRELOAD} &&
2521
unset LD_PRELOAD &&

t/t3002-pmi.t

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@ test_expect_success 'flux run sets PMI_FD' '
2020
test_expect_success 'flux run sets FLUX_PMI_LIBRARY_PATH' '
2121
flux run printenv FLUX_PMI_LIBRARY_PATH
2222
'
23+
test_expect_success 'flux run sets LD_LIBRARY_PATH if unset' '
24+
flux run --env=-LD_LIBRARY_PATH printenv LD_LIBRARY_PATH \
25+
>libpath.out &&
26+
echo $(dirname $(flux config builtin pmi_library_path)) \
27+
>libpath.exp &&
28+
test_cmp libpath.exp libpath.out
29+
'
30+
test_expect_success 'flux run prepends to LD_LIBRARY_PATH if set' '
31+
flux run --env=LD_LIBRARY_PATH=/a printenv LD_LIBRARY_PATH \
32+
>libpath2.out &&
33+
echo $(dirname $(flux config builtin pmi_library_path)):/a \
34+
>libpath2.exp &&
35+
test_cmp libpath2.exp libpath2.out
36+
'
37+
test_expect_success 'flux run -o pmi=off does not set LD_LIBRARY_PATH' '
38+
test_must_fail flux run -o pmi=off --env=-LD_LIBRARY_PATH \
39+
printenv LD_LIBRARY_PATH
40+
'
2341
test_expect_success 'flux run -o pmi=simple sets PMI_FD' '
2442
flux run -o pmi=simple printenv PMI_FD
2543
'

0 commit comments

Comments
 (0)