~upstart-devel/upstart/trunk

« back to all changes in this revision

Viewing changes to init/tests/test_state.c

* Merge of lp:~jamesodhunt/upstart/remove-basic-user-sessions.
  (Note: won't compile due to dependency of commit about to be applied).

Show diffs side-by-side

added added

removed removed

Lines of Context:
217
217
        if (obj_string_check (a, b, chroot))
218
218
                goto fail;
219
219
 
220
 
        if (obj_num_check (a, b, user))
221
 
                goto fail;
222
 
 
223
220
        if (obj_string_check (a, b, conf_path))
224
221
                goto fail;
225
222
 
871
868
        TEST_NE_P (json, NULL);
872
869
 
873
870
        /* Create a couple of sessions */
874
 
        session1 = session_new (NULL, "/abc", getuid ());
 
871
        session1 = session_new (NULL, "/abc");
875
872
        TEST_NE_P (session1, NULL);
876
873
        session1->conf_path = NIH_MUST (nih_strdup (session1, "/def/ghi"));
877
874
        TEST_LIST_NOT_EMPTY (sessions);
878
875
 
879
 
        session2 = session_new (NULL, "/foo", 0);
 
876
        session2 = session_new (NULL, "/foo");
880
877
        TEST_NE_P (session2, NULL);
881
878
        session2->conf_path = NIH_MUST (nih_strdup (session2, "/bar/baz"));
882
879
 
1264
1261
        TEST_LIST_EMPTY (conf_sources);
1265
1262
        TEST_HASH_EMPTY (job_classes);
1266
1263
 
1267
 
        session = session_new (NULL, "/my/session", getuid ());
 
1264
        session = session_new (NULL, "/my/session");
1268
1265
        TEST_NE_P (session, NULL);
1269
1266
        session->conf_path = NIH_MUST (nih_strdup (session, "/lives/here"));
1270
1267
        TEST_LIST_NOT_EMPTY (sessions);
1659
1656
        TEST_NE_P (env, NULL);
1660
1657
        TEST_NE_P (environ_add (&env, NULL, &len, TRUE, "FOO=BAR"), NULL);
1661
1658
 
1662
 
        session = session_new (NULL, "/abc", getuid ());
 
1659
        session = session_new (NULL, "/abc");
1663
1660
        TEST_NE_P (session, NULL);
1664
1661
        session->conf_path = NIH_MUST (nih_strdup (session, "/def/ghi"));
1665
1662
        TEST_LIST_NOT_EMPTY (sessions);