From a1144f9fd17da00f8b75b01f18e275ae624afd9f Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 26 Dec 2012 20:00:46 +0400 Subject: [PATCH] zdtm: mountpoints -- Explicitly remove old /dev/null We should explicitly unlink old /dev/null instance, otherwise if such device already exist we might hit a problem as | (00.002984) 7412 fdinfo 0: pos: 0x 0 flags: 100002/0 | (00.003015) Dumping path for 0 fd via self 42 [/dev/null] | (00.003025) Error (files-reg.c:422): Unaccessible path opened 2049:109720, need 5:10 | (00.003033) Error (cr-dump.c:1565): Dump files (pid: 7412) failed with -1 Reported-by: Alexander Kartashov Tested-by: Alexander Kartashov Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- test/zdtm/live/static/mountpoints.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/zdtm/live/static/mountpoints.c b/test/zdtm/live/static/mountpoints.c index 7de2ab183..afe0479d3 100644 --- a/test/zdtm/live/static/mountpoints.c +++ b/test/zdtm/live/static/mountpoints.c @@ -92,6 +92,7 @@ done: return 1; } + unlink("/dev/null"); mknod("/dev/null", 0777 | S_IFCHR, makedev(1, 3)); setup_outfile();