[PATCH] lib: framework: Improve message for results log file handling

Deb McLemore debmc at linux.vnet.ibm.com
Tue Jul 12 22:39:54 UTC 2016


When first creation of the results log is done
with root permissions, if subsequent non-root
user attempts to run tests which append to the
results log, the message can be improved to
suggest how to fix the problem or hints
on what the issue is for further diagnosis.

Signed-off-by: Deb McLemore <debmc at linux.vnet.ibm.com>
---
 src/lib/src/fwts_framework.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
index c53306a..9c2d3df 100644
--- a/src/lib/src/fwts_framework.c
+++ b/src/lib/src/fwts_framework.c
@@ -1520,7 +1520,10 @@ int fwts_framework_args(const int argc, char **argv)
 			(fw->flags & FWTS_FLAG_FORCE_CLEAN) ? "w" : "a",
 			fw->log_type)) == NULL) {
 		ret = FWTS_ERROR;
-		fprintf(stderr, "%s: Cannot open results log '%s'.\n", argv[0], fw->results_logname);
+		fprintf(stderr, "%s: Cannot open results log '%s'"
+			" (you may need to remove it to set proper"
+			" permissions).\n",
+			argv[0], fw->results_logname);
 		goto tidy_close;
 	}
 
-- 
1.8.3.1




More information about the fwts-devel mailing list