~vorlon/upstart/upstart-fix-racy-tests

« back to all changes in this revision

Viewing changes to test/test_util_common.c

  • Committer: James Hunt
  • Date: 2014-07-24 16:20:37 UTC
  • mfrom: (1658.1.2 upstart)
  • Revision ID: james.hunt@ubuntu.com-20140724162037-v2l03grpoo6rhjb0
* Merge of lp:~serge-hallyn/upstart/upstart-fix-cgm-env-tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1468
1468
                *p = '\0';
1469
1469
                if (cgmanager_create_sync(NULL, cgroup_manager, line, cg,
1470
1470
                                        &e) != 0) {
1471
 
                        nih_error("%s: failed to create cgroup %s:%s",
1472
 
                                __func__, line, cg);
 
1471
                        NihError *nerr;
 
1472
                        nerr = nih_error_get();
 
1473
                        nih_error("%s: failed to create cgroup %s:%s: %s",
 
1474
                                __func__, line, cg, nerr->message);
 
1475
                        nih_free(nerr);
1473
1476
                        goto out;
1474
1477
                }
1475
1478
                if (e == 1)
1476
1479
                        nih_warn("%s: boggle: cgroup %s:%s already existed",
1477
1480
                                        __func__, line, cg);
1478
1481
                if (cgmanager_remove_on_empty_sync(NULL, cgroup_manager, line,
1479
 
                                        cg) != 0)
1480
 
                        nih_warn("%s: failed to mark %s:%s remove-on-empty",
1481
 
                                __func__, line, cg);
 
1482
                                        cg) != 0) {
 
1483
                        NihError *nerr;
 
1484
                        nerr = nih_error_get();
 
1485
                        nih_warn("%s: failed to mark %s:%s remove-on-empty: %s",
 
1486
                                __func__, line, cg, nerr->message);
 
1487
                        nih_free(nerr);
 
1488
                }
1482
1489
                if (cgmanager_move_pid_sync(NULL, cgroup_manager, line, cg,
1483
1490
                                        mypid) != 0) {
1484
 
                        nih_error("%s: failed to move myself to cgroup %s:%s",
1485
 
                                __func__, line, cg);
 
1491
                        NihError *nerr;
 
1492
                        nerr = nih_error_get();
 
1493
                        nih_error("%s: failed to move myself to cgroup %s:%s: %s",
 
1494
                                __func__, line, cg, nerr->message);
 
1495
                        nih_free(nerr);
1486
1496
                        goto out;
1487
1497
                }
1488
1498
        }