Skip to content

Commit

Permalink
testsuite: add check for proctable service security
Browse files Browse the repository at this point in the history
Add test to ensure proctable shell service is not accessible to
all users in t2610-job-shell-mpir.t.
  • Loading branch information
grondo authored and trws committed Mar 30, 2020
1 parent d277817 commit e566288
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions t/t2610-job-shell-mpir.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,21 @@ for test in 1:1 2:2 2:4 4:4 4:8 4:7; do
flux job attach ${id}
'
done


test_expect_success 'flux-shell: test security of proctable method' '
id=$(flux mini submit -o stop-tasks-in-exec /bin/true) &&
flux job wait-event -vt 5 -p guest.exec.eventlog \
-m sync=true ${id} shell.start &&
shell_rank=$(shell_leader_rank $id) &&
shell_service=$(shell_service $id) &&
( export FLUX_HANDLE_USERID=9999 &&
export FLUX_HANDLE_ROLEMASK=0x2 &&
test_expect_code 1 ${mpir} $shell_rank $shell_service
) &&
${mpir} $(shell_leader_rank $id) $(shell_service $id) &&
flux job kill -s CONT ${id} &&
flux job attach ${id}
'

test_done

0 comments on commit e566288

Please sign in to comment.