[slurm-users] Unit Testing job_submit.lua

Groner, Rob rug262 at psu.edu
Fri Feb 17 22:10:42 UTC 2023


I'm trying to setup some testing of our job_submit.lua plugin so I can verify that changes I make to it don't break anything.

I looked into luaunit for testing, and that seems like it would do what I need....let me set the value of inputs, call the slurm_job_submit() function with them, and then evaluate the results.

But the setting of inputs is causing me issues.  I know plenty of C, and very little of Lua.  I see that the slurm_job_submit() function gets passed a job_desc_msg_t variable or pointer (or at least, I ASSUME it's that) and somehow knows what's inside it, even though "slurm.h" isn't included anywhere.  When I try to create a local variable of that type and set some values in it, it doesn't go well.

Is there an easier way to unit test that file and the slurm_job_submit() function in particular?

Thanks,

Rob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20230217/c7360310/attachment.htm>


More information about the slurm-users mailing list