support limit
This commit is contained in:
parent
bef32ace38
commit
ecf1916d78
33 changed files with 3036 additions and 243 deletions
|
|
@ -58,6 +58,27 @@ static void test_add_res_reason(void)
|
|||
erase_job_preason(&reason);
|
||||
}
|
||||
|
||||
static void test_add_shared_res_reason(void)
|
||||
{
|
||||
xce_job_preason_t reason;
|
||||
|
||||
memset(&reason, 0x0, sizeof(reason));
|
||||
|
||||
add_job_preason(&reason, 1, NULL, "res1");
|
||||
TEST_ASSERT_TRUE(reason.main_reason == 0);
|
||||
TEST_ASSERT_TRUE((reason.nres_reasons == 1)
|
||||
&& (reason.res_based_reasons != NULL)
|
||||
&& (reason.res_based_reasons[0] != NULL));
|
||||
TEST_ASSERT_TRUE(
|
||||
(reason.res_based_reasons[0]->reason == 1)
|
||||
&& (strcmp(reason.res_based_reasons[0]->host, "") == 0)
|
||||
&& (strcmp(reason.res_based_reasons[0]->resource, "res1") == 0));
|
||||
TEST_ASSERT_TRUE((reason.nhost_reasons == 0)
|
||||
&& (reason.host_based_reasons == NULL));
|
||||
erase_job_preason(&reason);
|
||||
}
|
||||
|
||||
|
||||
static void test_add_res_host_reason(void)
|
||||
{
|
||||
xce_job_preason_t reason;
|
||||
|
|
@ -161,6 +182,7 @@ void test_preason(void)
|
|||
RUN_TEST(test_main_reason);
|
||||
RUN_TEST(test_add_host_reason);
|
||||
RUN_TEST(test_add_res_reason);
|
||||
RUN_TEST(test_add_shared_res_reason);
|
||||
RUN_TEST(test_add_res_host_reason);
|
||||
RUN_TEST(test_add_main_reset_other);
|
||||
RUN_TEST(test_add_more_host_reason);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue