Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b274e75c authored by Shuah Khan's avatar Shuah Khan
Browse files

selftests: futex: convert test to use ksft TAP13 framework



Convert test to use ksft TAP13 framework to print user friendly
test output which is consistent across kselftest suite.

Acked-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 3c1f619e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -394,8 +394,10 @@ int main(int argc, char *argv[])
		}
	}

	printf("%s: Test requeue functionality\n", basename(argv[0]));
	printf("\tArguments: broadcast=%d locked=%d owner=%d timeout=%ldns\n",
	ksft_print_header();
	ksft_print_msg("%s: Test requeue functionality\n", basename(argv[0]));
	ksft_print_msg(
		"\tArguments: broadcast=%d locked=%d owner=%d timeout=%ldns\n",
		broadcast, locked, owner, timeout_ns);

	/*
+2 −1
Original line number Diff line number Diff line
@@ -78,7 +78,8 @@ int main(int argc, char *argv[])
		}
	}

	printf("%s: Detect mismatched requeue_pi operations\n",
	ksft_print_header();
	ksft_print_msg("%s: Detect mismatched requeue_pi operations\n",
	       basename(argv[0]));

	if (pthread_create(&child, NULL, blocking_child, NULL)) {
+3 −2
Original line number Diff line number Diff line
@@ -143,9 +143,10 @@ int main(int argc, char *argv[])
		}
	}

	printf("%s: Test signal handling during requeue_pi\n",
	ksft_print_header();
	ksft_print_msg("%s: Test signal handling during requeue_pi\n",
	       basename(argv[0]));
	printf("\tArguments: <none>\n");
	ksft_print_msg("\tArguments: <none>\n");

	sa.sa_handler = handle_signal;
	sigemptyset(&sa.sa_mask);
+4 −2
Original line number Diff line number Diff line
@@ -97,7 +97,9 @@ int main(int argc, char **argv)
		}
	}

	printf("%s: Test the futex value of private file mappings in FUTEX_WAIT\n",
	ksft_print_header();
	ksft_print_msg(
		"%s: Test the futex value of private file mappings in FUTEX_WAIT\n",
		basename(argv[0]));

	ret = pthread_create(&thr, NULL, thr_futex_wait, NULL);
+3 −2
Original line number Diff line number Diff line
@@ -68,9 +68,10 @@ int main(int argc, char *argv[])
		}
	}

	printf("%s: Block on a futex and wait for timeout\n",
	ksft_print_header();
	ksft_print_msg("%s: Block on a futex and wait for timeout\n",
	       basename(argv[0]));
	printf("\tArguments: timeout=%ldns\n", timeout_ns);
	ksft_print_msg("\tArguments: timeout=%ldns\n", timeout_ns);

	/* initialize timeout */
	to.tv_sec = 0;
Loading