On Mon, Dec 15, 2008 at 12:59:07PM +0530, Sudhir Kumar wrote:
> The patch adds a binary to be run as load on the machine.
>
> Signed-off-by: Sudhir Kumar <[email protected]>
>
> Index:
> ltp-full-20081130/testcases/kernel/controllers/cpuctl/cpuctl_latency_test.c
> ===================================================================
> --- /dev/null
> +++
> ltp-full-20081130/testcases/kernel/controllers/cpuctl/cpuctl_latency_test.c
> @@ -0,0 +1,106 @@
> +/******************************************************************************/
> +/* File: cpuctl_latency_test.c
> */
> +/*
> */
> +/* Description: This is a c program that runs a task which tries to keep cpu
> */
> +/* busy in doing some calculations. The task will ne used to
> */
s/ne/?
> +/* check the latency under group scheduling.
> */
> +/* The file is to be used by script
> */
Why double line spacing ? LTP needs that ?
> +
> +#include <unistd.h>
> +#include <math.h>
> +#include <signal.h>
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <string.h>
> +
> +#include "../libcontrollers/libcontrollers.h"
> +
> +
> +extern int Tst_count;
> +char *TCID = "cpu_controller_latency_tests";
> +int TST_TOTAL = 2;
> +
> +void sighandler(int i)
> +{
> + exit(0);
> +}
> +
> +int main(int argc, char *argv[])
> +{
> + char mytaskfile[FILENAME_MAX];
> + int test_num;
> +
> + /* Signal handler for tasks for exiting gracefully */
> + struct sigaction newaction, oldaction;
> + sigemptyset(&newaction.sa_mask);
> + sigaddset(&newaction.sa_mask, SIGUSR1);
> + newaction.sa_handler = &sighandler;
> + sigaction(SIGUSR1, &newaction, &oldaction);
> +
> + if ((argc < 2) || (argc > 3)) {
> + printf("Invalid #args received from script The load tasks will"
> + " not run. So skipping the load creation....\n");
Since this is run from a testscript, I don't think we will ever hit
this failure case. But if a user sees "So skipping the load creation",
it probably will make little sense to him. May be "Terminating the test"
is more understandable.
Regards,
Bharata.
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list