<p dir="ltr">Hi Pavel,<br></p>
<p dir="ltr">On Dec 24, 2015 7:58 AM, &quot;Pavel Emelyanov&quot; &lt;<a href="mailto:xemul@parallels.com">xemul@parallels.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi, Tycho! Merry Christmas and happy New Year :) I have a present for you ;)</p>
<p dir="ltr">:D yep, I am on holiday for the next couple of weeks, but I will try to send a patch as time permits. Merry Christmas to you guys as well :-) </p>
<p dir="ltr">Tycho </p>
<p dir="ltr">&gt;<br>
&gt; If slightly modifying the remap_dead_pid test to make it open not<br>
&gt; /proc/pid/some file, but the /proc/pid/ directory itself, the restore<br>
&gt; fails with<br>
&gt;<br>
&gt; (00.002065)     77: Error (files-reg.c:1308): Can&#39;t open file proc/78 (deleted) on restore: No such file or directory<br>
&gt; (00.002068)     77: Error (files-reg.c:1251): Can&#39;t open file proc/78 (deleted): No such file or directory<br>
&gt;<br>
&gt; In the images dir the remap image is absent, that makes me think that<br>
&gt; the logic in check_path_remap() misses the /proc/pid directory for<br>
&gt; exited tasks.<br>
&gt;<br>
&gt; No hurry with this, would you take a look at the issue once time permits?<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
&gt; ---<br>
&gt;  test/zdtm/live/static/Makefile                | 2 ++<br>
&gt;  test/zdtm/live/static/remap_dead_pid.c        | 7 ++++++-<br>
&gt;  test/zdtm/live/static/remap_dead_pid_dir.c    | 1 +<br>
&gt;  test/zdtm/live/static/remap_dead_pid_dir.desc | 1 +<br>
&gt;  4 files changed, 10 insertions(+), 1 deletion(-)<br>
&gt;  create mode 120000 test/zdtm/live/static/remap_dead_pid_dir.c<br>
&gt;  create mode 100644 test/zdtm/live/static/remap_dead_pid_dir.desc<br>
&gt;<br>
&gt; diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile<br>
&gt; index 42eea67..6add552 100644<br>
&gt; --- a/test/zdtm/live/static/Makefile<br>
&gt; +++ b/test/zdtm/live/static/Makefile<br>
&gt; @@ -132,6 +132,7 @@ TST_NOFILE  =                               \<br>
&gt;                 dumpable01                      \<br>
&gt;                 dumpable02                      \<br>
&gt;                 remap_dead_pid                  \<br>
&gt; +               remap_dead_pid_dir              \<br>
&gt;                 aio00                           \<br>
&gt;                 fd                              \<br>
&gt;                 apparmor                                \<br>
&gt; @@ -368,6 +369,7 @@ sk-freebind-false:  override CFLAGS += -DZDTM_FREEBIND_FALSE<br>
&gt;  stopped01:     override CFLAGS += -DZDTM_STOPPED_KILL<br>
&gt;  stopped02:     override CFLAGS += -DZDTM_STOPPED_TKILL<br>
&gt;  stopped12:     override CFLAGS += -DZDTM_STOPPED_KILL -DZDTM_STOPPED_TKILL<br>
&gt; +remap_dead_pid_dir:    override CFLAGS += -DZDTM_PROC_DIR<br>
&gt;<br>
&gt;  $(LIB):        force<br>
&gt;         $(Q) $(MAKE) -C $(LIBDIR)<br>
&gt; diff --git a/test/zdtm/live/static/remap_dead_pid.c b/test/zdtm/live/static/remap_dead_pid.c<br>
&gt; index c16832d..08efd55 100644<br>
&gt; --- a/test/zdtm/live/static/remap_dead_pid.c<br>
&gt; +++ b/test/zdtm/live/static/remap_dead_pid.c<br>
&gt; @@ -40,9 +40,14 @@ int main(int argc, char **argv)<br>
&gt;                 char path[PATH_MAX];<br>
&gt;                 pid_t result;<br>
&gt;<br>
&gt; +#ifdef ZDTM_PROC_DIR<br>
&gt; +               sprintf(path, &quot;/proc/%d&quot;, pid);<br>
&gt; +               fd = open(path, O_RDONLY | O_DIRECTORY);<br>
&gt; +#else<br>
&gt;                 sprintf(path, &quot;/proc/%d/mountinfo&quot;, pid);<br>
&gt; -<br>
&gt;                 fd = open(path, O_RDONLY);<br>
&gt; +#endif<br>
&gt; +<br>
&gt;<br>
&gt;                 /* no matter what, we should kill the child */<br>
&gt;                 kill(pid, SIGKILL);<br>
&gt; diff --git a/test/zdtm/live/static/remap_dead_pid_dir.c b/test/zdtm/live/static/remap_dead_pid_dir.c<br>
&gt; new file mode 120000<br>
&gt; index 0000000..3739fc7<br>
&gt; --- /dev/null<br>
&gt; +++ b/test/zdtm/live/static/remap_dead_pid_dir.c<br>
&gt; @@ -0,0 +1 @@<br>
&gt; +remap_dead_pid.c<br>
&gt; \ No newline at end of file<br>
&gt; diff --git a/test/zdtm/live/static/remap_dead_pid_dir.desc b/test/zdtm/live/static/remap_dead_pid_dir.desc<br>
&gt; new file mode 100644<br>
&gt; index 0000000..63df42a<br>
&gt; --- /dev/null<br>
&gt; +++ b/test/zdtm/live/static/remap_dead_pid_dir.desc<br>
&gt; @@ -0,0 +1 @@<br>
&gt; +{&#39;flavor&#39;: &#39;h&#39;}<br>
&gt; --<br>
&gt; 1.9.3<br>
&gt;<br>
</p>