Modify nr_dlsim, nr_pbchsim and nr_pucchsim to return '0' on success

- Change return value of nr_dlsim, nr_pbchsim and nr_pucchsim to:
  - Return '0' if test succeeds (indicated also by "PDSCH/PBCH/PUCCH test
    OK" in the test log).
  - Return '1' if test fails.
This commit is contained in:
Jaroslava Fiedlerova
2025-05-16 13:42:23 +02:00
parent 8ca6a4a06e
commit 2402f37271
3 changed files with 9 additions and 6 deletions
+3 -1
View File
@@ -109,6 +109,7 @@ int main(int argc, char **argv)
//int subframe_offset;
//char fname[40], vname[40];
int trial,n_trials=100,n_errors=0,ack_nack_errors=0,sr_errors=0;
int ret = 1;
uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
uint16_t Nid_cell=0;
uint64_t SSB_positions=0x01;
@@ -758,6 +759,7 @@ int main(int argc, char **argv)
printf("ACK/NACK: SNR=%f, n_trials=%d, n_bit_errors=%d\n",SNR,n_trials,ack_nack_errors);
if((float)(ack_nack_errors+sr_errors)/(float)(n_trials)<=target_error_rate){
printf("PUCCH test OK\n");
ret = 0;
break;
}
}
@@ -799,5 +801,5 @@ int main(int argc, char **argv)
loader_reset();
logTerm();
return(n_errors);
return ret;
}