From: Branden Archer Date: Wed, 10 May 2017 02:29:19 +0000 (-0400) Subject: Bail on error if cannot create pipe file X-Git-Tag: 0.12.0~8^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dfd34e531fc5bbbdb8b6bc4efd7d19866ddba9c7;p=check Bail on error if cannot create pipe file There have been cases where a test will fail with "No messaging setup". This is believed to be a permissions issue, where the test process is unable to create a file in the folder selected for temporary files. To make this error more explicit, if creating a temporary file fails bail. --- diff --git a/src/check_msg.c b/src/check_msg.c index 9483654..985eca0 100644 --- a/src/check_msg.c +++ b/src/check_msg.c @@ -315,11 +315,19 @@ static void setup_pipe(void) if(send_file1 == NULL) { send_file1 = open_tmp_file(&send_file1_name); + if(send_file1 == NULL) + { + eprintf("Unable to create temporary file for communication; may not have permissions to do so", __FILE__, __LINE__ -3); + } return; } if(send_file2 == NULL) { send_file2 = open_tmp_file(&send_file2_name); + if(send_file2 == NULL) + { + eprintf("Unable to create temporary file for communication; may not have permissions to do so", __FILE__, __LINE__ -3); + } return; } eprintf("Only one nesting of suite runs supported", __FILE__, __LINE__);