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