Exemple #1
0
int main( int argc, char * argv[] )
{
	testManager();

	testServer();

	return 0;
}
Exemple #2
0
static void testManagerAllPortsCall(const iocshArgBuf * args)
{
    char *filename = args[0].sval;
    FILE       *file = stdout;

    if(filename && strlen(filename)>0) {
        /*create empty file*/
        file = fopen(filename,"w");
        if(!file) {
            printf("could not open %s %s\n",filename,strerror(errno));
            return;
        }
    } 
    testManager("cantBlockSingle",0,file);
    testManager("cantBlockMulti",0,file);
    testManager("canBlockSingle",0,file);
    testManager("canBlockMulti",0,file);
    if(file!=stdout) fclose(file);
}
Exemple #3
0
static void testManagerCall(const iocshArgBuf * args)
{
    char *portName = args[0].sval;
    int   addr = args[1].ival;
    char *filename = args[2].sval;
    FILE *file = stdout;

    if(filename && strlen(filename)>0) {
        file = fopen(filename,"w");
        if(!file) {
            printf("could not open %s %s\n",filename,strerror(errno));
            return;
        }
    }
    testManager(portName,addr,file);
    if(file!=stdout) fclose(file);
}