} \
/** verify correctness of data */ \
fd = open (dev0->log_file, O_RDONLY); \
+ ASSERT_GE (fd, 0); \
bytes_to_read = sizeof (float) * BUF_LENGTH * dev0->num_scan_elements/SKIP; \
data_buffer = (gchar *) malloc (bytes_to_read); \
bytes_read = read (fd, data_buffer, bytes_to_read); \
/** verify correctness of data */
fd = open (dev0->log_file, O_RDONLY);
+ ASSERT_GE (fd, 0);
bytes_to_read = sizeof (float) * BUF_LENGTH * dev0->num_scan_elements;
data_buffer = (gchar *) malloc (bytes_to_read);
bytes_read = read (fd, data_buffer, bytes_to_read);
src_iio_pipeline = gst_parse_launch (parse_launch, NULL);
/** move channel specific type for channel 1 to generic */
- g_rename (dev0->scan_el_type[1], dev0->scan_el_type_generic);
+ ASSERT_EQ (g_rename (dev0->scan_el_type[1], dev0->scan_el_type_generic), 0);
/** disable all/some channels */
for (int idx = 0; idx < num_scan_elements; idx++) {
write_file_int (dev0->scan_el_en[idx], 0);
/** verify correctness of data */
fd = open (dev0->log_file, O_RDONLY);
+ ASSERT_GE (fd, 0);
bytes_to_read = sizeof (float) * BUF_LENGTH * dev0->num_scan_elements;
data_buffer = (gchar *) malloc (bytes_to_read);
bytes_read = read (fd, data_buffer, bytes_to_read);