Signed-off-by: Timothy Manning <tfhmanning@gmail.com>
void init_quick_tests(int argc, char *argv[])
{
int trace=0;
void init_quick_tests(int argc, char *argv[])
{
int trace=0;
int x=0;
do{
new_option=getopt_long(argc,argv,short_options,long_options,NULL);
int x=0;
do{
new_option=getopt_long(argc,argv,short_options,long_options,NULL);
- if (0==strcmp(argv[x],"-h")){
printf("help\n");
printf("-h will print the commands available\n");
printf("help\n");
printf("-h will print the commands available\n");
- printf("-c will continue after a test failes else the program will exit\n");
+ printf("-c will continue after a test fails else the program will exit\n");
printf("-v will print all messages\n");
printf("-q quiet mode only the number of tests passed and failed will be printed\n");
printf("-t [number] set yaffs_trace to number\n");
printf("-v will print all messages\n");
printf("-q quiet mode only the number of tests passed and failed will be printed\n");
printf("-t [number] set yaffs_trace to number\n");
{"threads", 1,NULL,'t'}
};
{"threads", 1,NULL,'t'}
};
-const char short_options[]="hqn:t:cv";
+const char short_options[]="ht:";
int new_option;
int x=0;
int new_num_of_threads=5;
int new_option;
int x=0;
int new_num_of_threads=5;
+ x=(unsigned)time(NULL);
+ printf("seeding srand with: %d\n",x);
+ srand(x);
do{
new_option=getopt_long(argc,argv,short_options,long_options,NULL);
do{
new_option=getopt_long(argc,argv,short_options,long_options,NULL);
- if (0==strcmp(argv[x],"-h")){
printf("help\n");
printf("-h will print the commands available\n");
printf("help\n");
printf("-h will print the commands available\n");
- printf("-c will continue after a test failes else the program will exit\n");
- printf("-v will print all messages\n");
- printf("-q quiet mode only the number of tests passed and failed will be printed\n");
- printf("-t [number] set yaffs_trace to number\n");
- printf("-n [number] sets the number of random loops to run after the the test has run\n");
+ printf("-t [number] sets the number of threads\n");
exit(0);
} else if (new_option=='t') {
new_num_of_threads=atoi(optarg);
exit(0);
} else if (new_option=='t') {
new_num_of_threads=atoi(optarg);
#ifndef __threading_h__
#define __threading_h__
#ifndef __threading_h__
#define __threading_h__
#include <pthread.h>
#include <stdio.h>
#include "thread_function.h"
#include <pthread.h>
#include <stdio.h>
#include "thread_function.h"