Skip to content

Commit 8e1acab

Browse files
committed
testsuite: test invalid args to flux_shell_mustache_render(3)
Problem: There's no test in the testsuite that ensures the shell does not crash if flux_shell_mustache_render(3) is passed invalid arguments. Add this check to t/shell/plugins/invalid-args.c.
1 parent 2b4eeac commit 8e1acab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

t/shell/plugins/invalid-args.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ static int shell_cb (flux_plugin_t *p,
194194
ok (flux_shell_task_next (NULL) == NULL && errno == EINVAL,
195195
"flux_shell_task_next (NULL) returns EINVAL");
196196

197+
ok (flux_shell_mustache_render (NULL, NULL) == NULL && errno == EINVAL,
198+
"flux_shell_mustache_render (NULL, NULL) returns EINVAL");
199+
ok (flux_shell_mustache_render (shell, NULL) == NULL && errno == EINVAL,
200+
"flux_shell_mustache_render (shell, NULL) returns EINVAL");
201+
197202
if (strcmp (topic, "shell.init") == 0) {
198203
ok (flux_shell_current_task (NULL) == NULL && errno == EINVAL,
199204
"flux_shell_current_task with NULL shell returns EINVAL");

0 commit comments

Comments
 (0)