Esempio n. 1
0
static int testaddr(void *addr, volatile void *want)
{
#if defined(__s390__)
	if (addr != (void *) ((unsigned long) want & ~0xffful)) {
#else
	if (addr != want) {
#endif
		fprintf(stderr, "  FAIL: expected si_addr==%p, not %p\n", want, addr);
		return 0;
	}
	return 1;

}

static void handler(int sig, siginfo_t *si, void *uc)
{
	int ok = 1;

	ok = ok && testsig(sig, cur_test->sig);
	ok = ok && testcode(si->si_code, cur_test->code);
	if (cur_test->addr)
		ok = ok && testaddr(si->si_addr, cur_test->addr);

	if (ok)
		fprintf(stderr, "  PASS\n");

	siglongjmp(escape, ok + 1);
}
Esempio n. 2
0
int main() {
  int retcode = 0;

  retcode = printf("Hello, sailor!\n");
  testcode((Var)retcode);

}
Esempio n. 3
0
static int testaddr(void *addr, volatile void *want)
{
	/* Some architectures (e.g. s390) just provide enough information to
         resolve the page fault, but do not provide the offset within a page */
#if defined(__s390__)
	if (addr != (void *) ((unsigned long) want & ~0xffful)) {
#else
	if (addr != want) {
#endif
		fprintf(stderr, "  FAIL: expected si_addr==%p, not %p\n", want, addr);
		return 0;
	}
	return 1;

}

static void handler(int sig, siginfo_t *si, void *uc)
{
	int ok = 1;

	ok = ok && testsig(sig, cur_test->sig);
	ok = ok && testcode(si->si_code, cur_test->code);
	if (cur_test->addr)
		ok = ok && testaddr(si->si_addr, cur_test->addr);

	if (ok)
		fprintf(stderr, "  PASS\n");

	siglongjmp(escape, ok + 1);
}
Esempio n. 4
0
static void handler(int sig, siginfo_t *si, void *uc)
{
   int ok = 1;

   ok = ok && testsig(sig, curr_test->sig);
   ok = ok && testcode(si->si_code, curr_test->code);

   if (ok)
      fprintf(stderr, "  PASS\n");

   siglongjmp(escape, ok + 1);
}
Esempio n. 5
0
main(){
sys$testcode();
sys$testcode2();
}
Esempio n. 6
0
CModViewView::CModViewView()
{
	testcode();
}
Esempio n. 7
0
int main(void)
{
	testcode();
	_getch();
	return 0;
}