From 8dc20bb2705e8df9173e1419130ad02e390efa23 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sat, 16 Aug 2025 21:23:44 +0200 Subject: [PATCH] [tests] Remove non-working duplicated code It is almost an exact copy of testrigopen 1 line different and without includes so it's not compiling. --- tests/callback.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 tests/callback.c diff --git a/tests/callback.c b/tests/callback.c deleted file mode 100644 index dfa1f5b34..000000000 --- a/tests/callback.c +++ /dev/null @@ -1,42 +0,0 @@ -int callback(const struct rig_caps *caps, rig_ptr_t rigp) -{ - RIG *rig = (RIG *) rigp; - - rig = rig_init(caps->rig_model); - - if (!rig) - { - fprintf(stderr, "Unknown rig num: %u\n", caps->rig_model); - fprintf(stderr, "Please check riglist.h\n"); - exit(1); /* whoops! something went wrong (mem alloc?) */ - } - - const char *port = "/dev/pts/3"; - strcpy(RIGPORT(rig)->pathname, port); - - printf("%20s:", caps->model_name); - fflush(stdout); - struct timeval start, end; - gettimeofday(&start, NULL); - rig_open(rig); - gettimeofday(&end, NULL); - double dstart = start.tv_sec + start.tv_usec / 1e6; - double dend = end.tv_sec + end.tv_usec / (double)1e6; - printf(" %.1f\n", dend - dstart); - - rig_close(rig); /* close port */ - rig_cleanup(rig); /* if you care about memory */ - return 1; -} - -int main(int argc, char *argv[]) -{ - RIG rig; - printf("testing rig timeouts when rig powered off\n"); - - /* Turn off backend debugging output */ - rig_set_debug_level(RIG_DEBUG_NONE); - rig_load_all_backends(); - rig_list_foreach(callback, &rig); - return 0; -}