~xnox/ubuntu/raring/upstart/autopkgtest

« back to all changes in this revision

Viewing changes to init/tests/test_job_process.c

  • Committer: Dmitrijs Ledkovs
  • Date: 2012-12-03 11:10:47 UTC
  • Revision ID: dmitrijs.ledkovs@canonical.com-20121203111047-wk2nmbdjq45eeiw9
Cherry-pickĀ -r1391..1394

Show diffs side-by-side

added added

removed removed

Lines of Context:
4885
4885
                        assert0 (unlink (script));
4886
4886
                } else {
4887
4887
                        TEST_GT (pid, 0);
 
4888
                        TEST_EQ (waitpid (pid, &status, 0), pid);
4888
4889
                }
4889
4890
 
4890
4891
                TEST_ALLOC_SAFE {
4891
4892
                        /* May alloc space if there is log data */
4892
4893
                        nih_free (class);
 
4894
                        TEST_GT (sprintf (filename, "%s/simple-test.log", dirname), 0);
 
4895
                        if (!test_alloc_failed) {
 
4896
                                output = fopen (filename, "r");
 
4897
                                TEST_NE_P (output, NULL);
 
4898
                                CHECK_FILE_EQ (output, "hello world\r\n", TRUE);
 
4899
                                TEST_FILE_END (output);
 
4900
                                TEST_EQ (fclose (output), 0);
 
4901
                        }
 
4902
                        unlink (filename);
4893
4903
                }
4894
4904
        }
4895
4905