Skip to contentSkip to conversation

test-runner: print which file failed to fchown

PATCH Applied James Prestwood 2 participants 2 messages Nov 21, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test-runner: print which file failed to fchown

---
 tools/test-runner.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/test-runner.c +2 -2
index 5e10f542..71c5f14e 100644
@@ -589,7 +589,7 @@ static pid_t execute_program(char *argv[], char *envp[], bool wait,
 			fd = open(log_file, O_WRONLY | O_CREAT | O_APPEND,
 					S_IRUSR | S_IWUSR);
 			if (fchown(fd, log_uid, log_gid) < 0)
-				l_error("fchown failed");
+				l_error("failed to fchown %s", log_file);
 		}
 
 		if (fd > -1) {
@@ -3190,7 +3190,7 @@ int main(int argc, char *argv[])
 			mkdir(log_dir, 0755);
 
 			if (chown(log_dir, log_uid, log_gid) < 0)
-				l_error("fchown failed");
+				l_error("failed to fchown %s", log_dir);
 
 			break;
 		case 'h':
Signature · 1 line
2.17.1
#1 lore raw

Hi James,

Quoted 4 lines · James Prestwood
---
  tools/test-runner.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Regards,
-Denis