| 84 | #define ITERATIONS (1000*2000) |
| 85 | |
| 86 | int main (void) |
| 87 | { |
| 88 | cpg_handle_t handle; |
| 89 | cs_error_t res; |
| 90 | int original_fd; |
| 91 | int i; |
| 92 | int fd; |
| 93 | |
| 94 | signal (SIGINT, sigintr_handler); |
| 95 | res = cpg_initialize (&handle, &callbacks); |
| 96 | if (res != CS_OK) { |
| 97 | printf ("FAIL %d\n", res); |
| 98 | exit (-1); |
| 99 | } |
| 100 | |
| 101 | res = cpg_fd_get (handle, &original_fd); |
| 102 | if (res != CS_OK) { |
| 103 | printf ("FAIL %d\n", res); |
| 104 | } |
| 105 | for (i = 0; i < ITERATIONS; i++) { |
| 106 | res = cpg_fd_get (handle, &fd); |
| 107 | if (original_fd != fd) { |
| 108 | printf ("FAIL\n"); |
| 109 | exit (-1); |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | cpg_finalize (handle); |
| 114 | |
| 115 | printf ("PASS\n"); |
| 116 | return (0); |
| 117 | } |
nothing calls this directly
no test coverage detected