static void test_host(const char*hostname)
{
char *data;
const char *noexist = "Unknown";
char exist[] = "Hdd";
XBT_INFO(
"== Print the properties of the host '%s'", hostname);
XBT_INFO(
" Host property: '%s' -> '%s'", key, data);
XBT_INFO(
"== Try to get a host property that does not exist");
xbt_assert(!value,
"The key exists (it's not supposed to)");
XBT_INFO(
"== Try to get a host property that does exist");
xbt_assert(value,
"\tProperty %s is undefined (where it should)", exist);
xbt_assert(!strcmp(value,
"180"),
"\tValue of property %s is defined to %s (where it should be 180)", exist, value);
XBT_INFO(
" Property: %s old value: %s", exist, value);
XBT_INFO(
"== Trying to modify a host property");
xbt_assert(value,
"Property %s is undefined (where it should)", exist);
xbt_assert(!strcmp(value,
"250"),
"Value of property %s is defined to %s (where it should be 250)", exist, value);
XBT_INFO(
" Property: %s old value: %s", exist, value);
}
static int alice(
int argc,
char *
argv[]) {
test_host("host1");
return 0;
}
static int carole(
int argc,
char *
argv[]) {
test_host("host1");
return 0;
}
static int david(
int argc,
char *
argv[]) {
test_host("node-0.acme.org");
return 0;
}
{
XBT_INFO(
"== Print the properties of the AS");
char *data;
const char *noexist = "UnknownProcessProp";
XBT_INFO(
"== Print the properties of the process");
XBT_INFO(
" Process property: %s -> %s", key, data);
XBT_INFO(
"== Try to get a process property that does not exist");
xbt_assert(!value,
"The property is defined (it shouldnt)");
return 0;
}
int main(
int argc,
char *argv[])
{
unsigned int i;
xbt_assert(argc > 2,
"Usage: %s platform_file deployment_file\n" "\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);
}
}