Disabled streaming output on many of the command tests
authorDavid Schleef <ds@schleef.org>
Wed, 6 Feb 2002 22:08:50 +0000 (22:08 +0000)
committerDavid Schleef <ds@schleef.org>
Wed, 6 Feb 2002 22:08:50 +0000 (22:08 +0000)
testing/cmd_1.c
testing/cmd_2.c
testing/inttrig.c
testing/main.c
testing/mmap.c
testing/select.c

index 86ce0768f2c2a8667298f6c97acc93c8cd5df7fa..404905ce497d694161d0a05ee9d0d7009f1cf364 100644 (file)
@@ -110,8 +110,9 @@ int test_cmd_read_fast_1chan(void)
        int go;
        int total=0;
        int ret;
+       unsigned int flags = comedi_get_subdevice_flags(device,subdevice);
 
-       if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
+       if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
                printf("not applicable\n");
                return 0;
        }
index af6f20ea584b840f0a732ae16110e539638101f1..09142ec42228ed43541d82655c8a7add8c219979 100644 (file)
@@ -19,8 +19,9 @@ static int get_chunks_per_length(int length);
 int test_cmd_fifo_depth_check(void)
 {
        int len;
+       unsigned int flags = comedi_get_subdevice_flags(device,subdevice);
 
-       if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
+       if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
                printf("not applicable\n");
                return 0;
        }
index 869cb45463920fffa2cbc5384601442faf9caca2..eacb36dab473ff5597c4013ffa0067cd6e99c519 100644 (file)
@@ -41,8 +41,10 @@ int test_cmd_start_inttrig(void)
        int go;
        int total=0;
        int ret;
+       unsigned int flags;
 
-       if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
+       flags = comedi_get_subdevice_flags(device,subdevice);
+       if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
                printf("not applicable\n");
                return 0;
        }
index f679e5f7f30436ddcd296048acb6acdecd749c21..b28a460cf0bc1c6da36464df8af3f586e8ead8b7 100644 (file)
@@ -145,7 +145,7 @@ int main(int argc, char *argv[])
        device = comedi_open(filename);
        if(!device){
                printf("E: comedi_open(\"%s\"): %s\n",filename,strerror(errno));
-               exit(0);
+               exit(1);
        }
 
        print_device_info();
index a859b8f437e22fabc8f4c1635655b579392a6a4c..3cb66378b5b4aa7902aee6b3606fd5dfea1ae03f 100644 (file)
@@ -62,8 +62,11 @@ int test_mmap(void)
        int ret;
        void *b, *adr;
        sampl_t *map;
+       unsigned int flags;
 
-       if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
+       flags = comedi_get_subdevice_flags(device,subdevice);
+
+       if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
                printf("not applicable\n");
                return 0;
        }
index 55e9d2d96a730ee673841cc7e44ebbb65ff0a74c..1325a4869c1c562621dba0b70f26affb8df402aa 100644 (file)
@@ -27,8 +27,10 @@ int test_read_select(void)
        int length=100000;
        fd_set rdset;
        struct timeval timeout;
+       unsigned int flags;
 
-       if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
+       flags = comedi_get_subdevice_flags(device,subdevice);
+       if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
                printf("not applicable\n");
                return 0;
        }