Changeset 2990 in MondoRescue for branches/3.0/mondo/test/test-mountlist.c


Ignore:
Timestamp:
Apr 5, 2012, 12:55:31 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • Improve test environment to debug #473 and #500, in link with #595 and #596 in order to have a working md support with UUIDs and metadata versions
  • create_raid_device_via_mdadm now has a thid test parameter to support that
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/test/test-mountlist.c

    r2394 r2990  
    33 *
    44 * Test program for mountlist management at restore time
    5  * Cn be used on host system with valgrind easier than with mondorestore
     5 * Can be used on host system with valgrind easier than with mondorestore
    66 */
    77#include <stdio.h>
     
    1212#include "../mondorestore/mondorestore.h"
    1313#include "../mondorestore/mr-externs.h"
     14
     15#define RAIDTAB_TEST "/tmp/raidtab"
     16#define MOUNTLIST_TEST "/tmp/mountlist.txt"
    1417
    1518extern void twenty_seconds_til_yikes(void);
     
    6871
    6972setup_newt_stuff();
    70 mr_asprintf(&g_mountlist_fname, "/tmp/mountlist.txt");
     73mr_asprintf(&g_mountlist_fname, MOUNTLIST_TEST);
    7174log_it("before mountlist");
    7275load_mountlist(mountlist, g_mountlist_fname);
     
    7477resize_mountlist_proportionately_to_suit_new_drives(mountlist);
    7578log_it("after resize_mountlist_proportionately_to_suit_new_drives");
    76 load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
     79load_raidtab_into_raidlist(raidlist, RAIDTAB_TEST);
    7780log_it("after load_raidtab_into_raidlist");
    7881edit_mountlist(g_mountlist_fname, mountlist, raidlist);
     
    8386mr_free(flaws_str);
    8487
     88log_it("before check raidlist content");
     89log_it("after check raidlist content");
     90
     91log_it("before create mdadm dev");
     92create_raid_device_via_mdadm(raidlist,"/dev/md0",FALSE);
     93log_it("after create mdadm dev");
     94
    8595mr_free(MONDO_LOGFILE);
    8696exit(0);
Note: See TracChangeset for help on using the changeset viewer.