int main (int argc, char ** argv) { INT64 result; int ok = 0; int tests = 0; registerSegvHandler(); tests++; fprintf(stderr, "Calling iretq\n"); result = iretqTest(); fprintf(stderr, "iretq result = %d %s\n", result, result == -2 ? "OK" : "***ERROR***"); ok += (result == -2); #if (0) /* Don't try iretd since I havent' been able to find a coherent description of * what it is supposed to do. */ tests++; fprintf(stderr, "Calling iretd\n"); result = iretdTest(); fprintf(stderr, "iretd result = %d %s\n", result, result == -1 ? "OK" : "***ERROR***"); ok += (result == -1); #endif return (ok == tests) ? 0 : -1; }
int main (int argc, char ** argv) { int result; int ok = 0; int tests = 0; registerSegvHandler(); tests++; fprintf(stderr, "Calling iret\n"); result = iretdTest(); fprintf(stderr, "iretd result = %d %s\n", result, result == -1 ? "OK" : "***ERROR***"); ok += (result == -1); return (ok == tests) ? 0 : -1; }