-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1492 from grondo/issue#1491
wreck: fix event payload and memory leak in job.submit-nocreate
- Loading branch information
Showing
6 changed files
with
160 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/sh | ||
# | ||
|
||
test_description='Test basic wreck functionality | ||
Test basic functionality of wreckrun facility. | ||
' | ||
|
||
. `dirname $0`/sharness.sh | ||
SIZE=${FLUX_TEST_SIZE:-4} | ||
test_under_flux ${SIZE} wreck | ||
|
||
# Return the previous jobid | ||
last_job_id() { | ||
flux wreck last-jobid | ||
} | ||
# Return previous job path in kvs | ||
last_job_path() { | ||
flux wreck last-jobid -p | ||
} | ||
test_expect_success 'load dummy sched module' ' | ||
flux module load ${FLUX_BUILD_DIR}/t/wreck/.libs/sched-dummy.so | ||
' | ||
test_expect_success 'job.sumbit issues correct event' ' | ||
$SHARNESS_TEST_SRCDIR/scripts/event-trace.lua \ | ||
-e "print (topic, msg.nnodes, msg.ncores, msg.ngpus)" \ | ||
wreck wreck.state.submitted \ | ||
flux submit -N2 -n8 hostname >output.submit && | ||
cat <<-EOF >expected.submit && | ||
wreck.state.submitted 2 8 0 | ||
EOF | ||
test_debug "cat output.submit" && | ||
test_cmp expected.submit output.submit | ||
' | ||
test_expect_success 'job.submit-nocreate issues correct event' ' | ||
$SHARNESS_TEST_SRCDIR/scripts/event-trace.lua \ | ||
-e "print (topic, msg.nnodes, msg.ncores, msg.ngpus)" \ | ||
wreck wreck.state.submitted \ | ||
flux wreckrun -w submitted -N2 -n4 -g1 hostname >output.createonly && | ||
cat <<-EOF >expected.createonly && | ||
wreck.state.reserved 2 4 4 | ||
wreck.state.submitted 2 4 4 | ||
EOF | ||
test_debug "cat output.createonly" && | ||
test_cmp expected.createonly output.createonly | ||
' | ||
test_expect_success 'unload dummy sched module' ' | ||
flux module remove sched | ||
' | ||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#if HAVE_CONFIG_H | ||
#include "config.h" | ||
#endif | ||
#include <flux/core.h> | ||
/* | ||
* Dummy sched module, do nothing but answer pings | ||
*/ | ||
int mod_main (flux_t *h, int argc, char *argv[]) | ||
{ | ||
if (flux_reactor_run (flux_get_reactor (h), 0) < 0) | ||
return (-1); | ||
return (0); | ||
} | ||
MOD_NAME ("sched"); | ||
/* | ||
* vi:tabstop=4 shiftwidth=4 expandtab | ||
*/ |