IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12236


Ignore:
Timestamp:
Mar 5, 2007, 12:36:18 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 1.1.15 (take 2)

Location:
trunk/ippdb
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/src/ippdb.c

    r12231 r12236  
    60106010static void chipProcessedExpRowFree(chipProcessedExpRow *object);
    60116011
    6012 chipProcessedExpRow *chipProcessedExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
     6012chipProcessedExpRow *chipProcessedExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
    60136013{
    60146014    chipProcessedExpRow *_object;
     
    60206020    _object->exp_tag = psStringCopy(exp_tag);
    60216021    _object->guide_id = guide_id;
     6022    _object->workdir = psStringCopy(workdir);
    60226023    _object->label = psStringCopy(label);
    60236024    _object->recipe = psStringCopy(recipe);
     
    60316032{
    60326033    psFree(object->exp_tag);
     6034    psFree(object->workdir);
    60336035    psFree(object->label);
    60346036    psFree(object->recipe);
     
    60556057        return false;
    60566058    }
     6059    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, "255")) {
     6060        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
     6061        psFree(md);
     6062        return false;
     6063    }
    60576064    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, "key", "64")) {
    60586065        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
     
    60886095}
    60896096
    6090 bool chipProcessedExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
     6097bool chipProcessedExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
    60916098{
    60926099    psMetadata *md = psMetadataAlloc();
     
    61036110    if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, guide_id)) {
    61046111        psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id");
     6112        psFree(md);
     6113        return false;
     6114    }
     6115    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) {
     6116        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
    61056117        psFree(md);
    61066118        return false;
     
    61496161bool chipProcessedExpInsertObject(psDB *dbh, chipProcessedExpRow *object)
    61506162{
    6151     return chipProcessedExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->label, object->recipe, object->expgroup, object->dvodb);
     6163    return chipProcessedExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->workdir, object->label, object->recipe, object->expgroup, object->dvodb);
    61526164}
    61536165
     
    62376249        return false;
    62386250    }
     6251    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) {
     6252        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
     6253        psFree(md);
     6254        return false;
     6255    }
    62396256    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, object->label)) {
    62406257        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
     
    62816298        return false;
    62826299    }
     6300    char* workdir = psMetadataLookupPtr(&status, md, "workdir");
     6301    if (!status) {
     6302        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir");
     6303        return false;
     6304    }
    62836305    char* label = psMetadataLookupPtr(&status, md, "label");
    62846306    if (!status) {
     
    63026324    }
    63036325
    6304     return chipProcessedExpRowAlloc(chip_id, exp_tag, guide_id, label, recipe, expgroup, dvodb);
     6326    return chipProcessedExpRowAlloc(chip_id, exp_tag, guide_id, workdir, label, recipe, expgroup, dvodb);
    63056327}
    63066328psArray *chipProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    71117133static void camPendingExpRowFree(camPendingExpRow *object);
    71127134
    7113 camPendingExpRow *camPendingExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
     7135camPendingExpRow *camPendingExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
    71147136{
    71157137    camPendingExpRow *_object;
     
    71207142    _object->cam_id = cam_id;
    71217143    _object->chip_id = chip_id;
     7144    _object->workdir = psStringCopy(workdir);
    71227145    _object->label = psStringCopy(label);
    71237146    _object->recipe = psStringCopy(recipe);
     
    71307153static void camPendingExpRowFree(camPendingExpRow *object)
    71317154{
     7155    psFree(object->workdir);
    71327156    psFree(object->label);
    71337157    psFree(object->recipe);
     
    71497173        return false;
    71507174    }
     7175    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, "255")) {
     7176        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
     7177        psFree(md);
     7178        return false;
     7179    }
    71517180    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, "key", "64")) {
    71527181        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
     
    71827211}
    71837212
    7184 bool camPendingExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
     7213bool camPendingExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
    71857214{
    71867215    psMetadata *md = psMetadataAlloc();
     
    71927221    if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) {
    71937222        psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id");
     7223        psFree(md);
     7224        return false;
     7225    }
     7226    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) {
     7227        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
    71947228        psFree(md);
    71957229        return false;
     
    72387272bool camPendingExpInsertObject(psDB *dbh, camPendingExpRow *object)
    72397273{
    7240     return camPendingExpInsert(dbh, object->cam_id, object->chip_id, object->label, object->recipe, object->expgroup, object->dvodb);
     7274    return camPendingExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->recipe, object->expgroup, object->dvodb);
    72417275}
    72427276
     
    73217355        return false;
    73227356    }
     7357    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) {
     7358        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
     7359        psFree(md);
     7360        return false;
     7361    }
    73237362    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, object->label)) {
    73247363        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
     
    73607399        return false;
    73617400    }
     7401    char* workdir = psMetadataLookupPtr(&status, md, "workdir");
     7402    if (!status) {
     7403        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir");
     7404        return false;
     7405    }
    73627406    char* label = psMetadataLookupPtr(&status, md, "label");
    73637407    if (!status) {
     
    73817425    }
    73827426
    7383     return camPendingExpRowAlloc(cam_id, chip_id, label, recipe, expgroup, dvodb);
     7427    return camPendingExpRowAlloc(cam_id, chip_id, workdir, label, recipe, expgroup, dvodb);
    73847428}
    73857429psArray *camPendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    74937537static void camProcessedExpRowFree(camProcessedExpRow *object);
    74947538
    7495 camProcessedExpRow *camProcessedExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *label, const char *recipe, const char *expgroup, const char *dvodb, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *path_base, psF32 zp_mean, psF32 zp_stdev, psS16 fault)
     7539camProcessedExpRow *camProcessedExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *path_base, psF32 zp_mean, psF32 zp_stdev, psS16 fault)
    74967540{
    74977541    camProcessedExpRow *_object;
     
    75027546    _object->cam_id = cam_id;
    75037547    _object->chip_id = chip_id;
     7548    _object->workdir = psStringCopy(workdir);
    75047549    _object->label = psStringCopy(label);
    75057550    _object->recipe = psStringCopy(recipe);
     
    75237568static void camProcessedExpRowFree(camProcessedExpRow *object)
    75247569{
     7570    psFree(object->workdir);
    75257571    psFree(object->label);
    75267572    psFree(object->recipe);
     
    75447590        return false;
    75457591    }
     7592    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, "255")) {
     7593        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
     7594        psFree(md);
     7595        return false;
     7596    }
    75467597    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, "key", "64")) {
    75477598        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
     
    76327683}
    76337684
    7634 bool camProcessedExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *label, const char *recipe, const char *expgroup, const char *dvodb, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *path_base, psF32 zp_mean, psF32 zp_stdev, psS16 fault)
     7685bool camProcessedExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *path_base, psF32 zp_mean, psF32 zp_stdev, psS16 fault)
    76357686{
    76367687    psMetadata *md = psMetadataAlloc();
     
    76427693    if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) {
    76437694        psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id");
     7695        psFree(md);
     7696        return false;
     7697    }
     7698    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) {
     7699        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
    76447700        psFree(md);
    76457701        return false;
     
    77437799bool camProcessedExpInsertObject(psDB *dbh, camProcessedExpRow *object)
    77447800{
    7745     return camProcessedExpInsert(dbh, object->cam_id, object->chip_id, object->label, object->recipe, object->expgroup, object->dvodb, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->sigma_ra, object->sigma_dec, object->nastro, object->path_base, object->zp_mean, object->zp_stdev, object->fault);
     7801    return camProcessedExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->recipe, object->expgroup, object->dvodb, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->sigma_ra, object->sigma_dec, object->nastro, object->path_base, object->zp_mean, object->zp_stdev, object->fault);
    77467802}
    77477803
     
    78267882        return false;
    78277883    }
     7884    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) {
     7885        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
     7886        psFree(md);
     7887        return false;
     7888    }
    78287889    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, object->label)) {
    78297890        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
     
    79207981        return false;
    79217982    }
     7983    char* workdir = psMetadataLookupPtr(&status, md, "workdir");
     7984    if (!status) {
     7985        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir");
     7986        return false;
     7987    }
    79227988    char* label = psMetadataLookupPtr(&status, md, "label");
    79237989    if (!status) {
     
    79968062    }
    79978063
    7998     return camProcessedExpRowAlloc(cam_id, chip_id, label, recipe, expgroup, dvodb, uri, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, nastro, path_base, zp_mean, zp_stdev, fault);
     8064    return camProcessedExpRowAlloc(cam_id, chip_id, workdir, label, recipe, expgroup, dvodb, uri, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, nastro, path_base, zp_mean, zp_stdev, fault);
    79998065}
    80008066psArray *camProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
  • trunk/ippdb/src/ippdb.h

    r12231 r12236  
    31313131    char            *exp_tag;
    31323132    psS64           guide_id;
     3133    char            *workdir;
    31333134    char            *label;
    31343135    char            *recipe;
     
    31463147    const char      *exp_tag,
    31473148    psS64           guide_id,
     3149    const char      *workdir,
    31483150    const char      *label,
    31493151    const char      *recipe,
     
    31823184    const char      *exp_tag,
    31833185    psS64           guide_id,
     3186    const char      *workdir,
    31843187    const char      *label,
    31853188    const char      *recipe,
     
    37543757    psS64           cam_id;
    37553758    psS64           chip_id;
     3759    char            *workdir;
    37563760    char            *label;
    37573761    char            *recipe;
     
    37683772    psS64           cam_id,
    37693773    psS64           chip_id,
     3774    const char      *workdir,
    37703775    const char      *label,
    37713776    const char      *recipe,
     
    38033808    psS64           cam_id,
    38043809    psS64           chip_id,
     3810    const char      *workdir,
    38053811    const char      *label,
    38063812    const char      *recipe,
     
    39643970    psS64           cam_id;
    39653971    psS64           chip_id;
     3972    char            *workdir;
    39663973    char            *label;
    39673974    char            *recipe;
     
    39893996    psS64           cam_id,
    39903997    psS64           chip_id,
     3998    const char      *workdir,
    39913999    const char      *label,
    39924000    const char      *recipe,
     
    40354043    psS64           cam_id,
    40364044    psS64           chip_id,
     4045    const char      *workdir,
    40374046    const char      *label,
    40384047    const char      *recipe,
  • trunk/ippdb/tests/alloc.c

    r12231 r12236  
    602602        chipProcessedExpRow *object;
    603603
    604         object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string"    );
     604        object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string", "a string"    );
    605605
    606606        if (!object) {
     
    620620            exit(EXIT_FAILURE);
    621621        }
     622        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     623            psFree(object);
     624            exit(EXIT_FAILURE);
     625        }
    622626        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
    623627            psFree(object);
     
    705709        camPendingExpRow *object;
    706710
    707         object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string"    );
     711        object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string"    );
    708712
    709713        if (!object) {
     
    719723            exit(EXIT_FAILURE);
    720724        }
     725        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     726            psFree(object);
     727            exit(EXIT_FAILURE);
     728        }
    721729        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
    722730            psFree(object);
     
    742750        camProcessedExpRow *object;
    743751
    744         object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16    );
     752        object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16    );
    745753
    746754        if (!object) {
     
    753761        }
    754762        if (!object->chip_id == -64) {
     763            psFree(object);
     764            exit(EXIT_FAILURE);
     765        }
     766        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
    755767            psFree(object);
    756768            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/insert.c

    r12231 r12236  
    223223        }
    224224
    225         if (!chipProcessedExpInsert(dbh, -64, "a string", -64, "a string", "a string", "a string", "a string")) {
     225        if (!chipProcessedExpInsert(dbh, -64, "a string", -64, "a string", "a string", "a string", "a string", "a string")) {
    226226            exit(EXIT_FAILURE);
    227227        }
     
    268268        }
    269269
    270         if (!camPendingExpInsert(dbh, -64, -64, "a string", "a string", "a string", "a string")) {
    271             exit(EXIT_FAILURE);
    272         }
    273 
    274         psDBCleanup(dbh);
    275     }
    276 
    277     {
    278         psDB            *dbh;
    279 
    280         dbh = psDBInit("localhost", "test", NULL, "test");
    281         if (!dbh) {
    282             exit(EXIT_FAILURE);
    283         }
    284 
    285         if (!camProcessedExpInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16)) {
     270        if (!camPendingExpInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string")) {
     271            exit(EXIT_FAILURE);
     272        }
     273
     274        psDBCleanup(dbh);
     275    }
     276
     277    {
     278        psDB            *dbh;
     279
     280        dbh = psDBInit("localhost", "test", NULL, "test");
     281        if (!dbh) {
     282            exit(EXIT_FAILURE);
     283        }
     284
     285        if (!camProcessedExpInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16)) {
    286286            exit(EXIT_FAILURE);
    287287        }
  • trunk/ippdb/tests/insertobject.c

    r12231 r12236  
    322322        }
    323323
    324         object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string");
     324        object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string", "a string");
    325325        if (!object) {
    326326            exit(EXIT_FAILURE);
     
    388388        }
    389389
    390         object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string");
     390        object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string");
    391391        if (!object) {
    392392            exit(EXIT_FAILURE);
     
    410410        }
    411411
    412         object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16);
     412        object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16);
    413413        if (!object) {
    414414            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/metadatafromobject.c

    r12231 r12236  
    709709        bool            status;
    710710
    711         object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string");
     711        object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string", "a string");
    712712        if (!object) {
    713713            exit(EXIT_FAILURE);
     
    731731            exit(EXIT_FAILURE);
    732732        }
     733        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
     734            psFree(md);
     735            exit(EXIT_FAILURE);
     736        }
    733737        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
    734738            psFree(md);
     
    832836        bool            status;
    833837
    834         object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string");
     838        object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string");
    835839        if (!object) {
    836840            exit(EXIT_FAILURE);
     
    850854            exit(EXIT_FAILURE);
    851855        }
     856        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
     857            psFree(md);
     858            exit(EXIT_FAILURE);
     859        }
    852860        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
    853861            psFree(md);
     
    875883        bool            status;
    876884
    877         object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16);
     885        object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16);
    878886        if (!object) {
    879887            exit(EXIT_FAILURE);
     
    890898            exit(EXIT_FAILURE);
    891899        }
     900            psFree(md);
     901            exit(EXIT_FAILURE);
     902        }
     903        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
    892904            psFree(md);
    893905            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/objectfrommetadata.c

    r12231 r12236  
    10791079            exit(EXIT_FAILURE);
    10801080        }
     1081        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
     1082            psFree(md);
     1083            exit(EXIT_FAILURE);
     1084        }
    10811085        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
    10821086            psFree(md);
     
    11141118            exit(EXIT_FAILURE);
    11151119        }
     1120        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     1121            psFree(object);
     1122            exit(EXIT_FAILURE);
     1123        }
    11161124        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
    11171125            psFree(object);
     
    12491257            exit(EXIT_FAILURE);
    12501258        }
     1259        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
     1260            psFree(md);
     1261            exit(EXIT_FAILURE);
     1262        }
    12511263        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
    12521264            psFree(md);
     
    12801292            exit(EXIT_FAILURE);
    12811293        }
     1294        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     1295            psFree(object);
     1296            exit(EXIT_FAILURE);
     1297        }
    12821298        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
    12831299            psFree(object);
     
    13111327            exit(EXIT_FAILURE);
    13121328        }
     1329        if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
     1330            psFree(md);
     1331            exit(EXIT_FAILURE);
     1332        }
    13131333        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
    13141334            psFree(md);
     
    13821402            exit(EXIT_FAILURE);
    13831403        }
     1404            psFree(object);
     1405            exit(EXIT_FAILURE);
     1406        }
     1407        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
    13841408            psFree(object);
    13851409            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.