- 12 Sep, 2012 1 commit
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 13 Sep, 2012 7 commits
-
-
Konstantin Khlebnikov authored
Testcase: fork child, chdir into /proc/$pid and kill child. test for http://bugzilla.openvz.org/show_bug.cgi?id=2315Signed-off-by:
Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by:
Andrey Wagin <avagin@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Redirect standard descriptors of a test init process in to the log file. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It was lost for tests which executed in a new namespaces. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The test creates two processes. A first process creates a tcp server, a second one connects to it. The first process is dumped and restored. Then the test checks that the TCP connection is alive. v2: fix compilation :) Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We're using get_service_fd in file engine, better to make it fast. This patch caches the limits system provides us, instead of calling getrlimit() every time. This patch introduces is_service_fd helper which will be used instead of get_service_fd where it make sense. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 12 Sep, 2012 27 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Add test for screen c/r. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Non-opened control terminal * Set a control terminal * Close a file descriptor on it * Dump/restore * Open the control terminal (/dev/tty) * Check, that it connected to the master end Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The test is tricky -- it opens master in task 1 and dup it in task 2, then close in task 1 and do C/R. Thus we need to setup SID of master terminal somehow in children, which usually fails in currnt tty restore implementation. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Two slaves on same pty. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The idea behind is pretty simple -- once we find that there is a controlling terminal present we do call ioctl on appropriate /dev/pts/N. This is done in a bit unusuall manner. When we find that there is a controling terminal present we do create an additional FdinfoEntry for it with object id taken from existing master peer. The file engine stack this new FdinfoEntry on fd_info_head head list. Thus we will have at least two entries on this list. One for real Fdinfo associated with master peer and one for our new generated Fdfinfo entry, it depends on pid which one become a file master. Finally we do use post_open_fd hook in our tty code which allows us to open controlling terminal and yield proper ioctl on it. v2: - restore control terminals via service fd, still need to speedup service fd retrieval. v3: - use prepare_ctl_tty() helper to generate control terminal fdinfo entry v4: - use post_open_fd Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Usually the PTYs represent a pair of links -- master peer and slave peer. Master peer must be opened before slave. Internally, when kernel creates master peer it also generates a slave interface in a form of /dev/pts/N, where N is that named pty "index". Master/slave connection unambiguously identified by this index. Still, one master can carry multiple slaves -- for example a user opens one master via /dev/ptmx and appropriate /dev/pts/N in sequence. The result will be the following master `- slave 1 `- slave 2 both slave will have same master index but different file descriptors. Still inside the kernel pty parameters are same for both slaves. Thus only one slave parameters should be restored, there is no need to carry all parameters for every slave peer we've found. Not yet addressed problems: - At moment of restore the master peer might be already closed for any reason so to resolve such problem we need to open a fake master peer with proper index and hook a slave on it, then we close master peer. - Need to figure out how to deal with ttys which have some data in buffers not yet flushed, at moment this data will be simply lost during c/r - Need to restore control terminals - Need to fetch tty flags such as exclusive/packet-mode, this can't be done without kernel patching [ avagin@: - ideas on contol terminals restore - overall code redesign and simplification ] v4: - drop redundant pid from dump_chrdev - make sure optional fown is passed on regular ptys - add a comments about zeroifying termios - get rid of redundant empty line in files.c v5 (by avagin@): - complete rework of tty image format, now we have two files -- tty.img and tty-info.img. The idea behind to reduce data being stored. v6 (by xemul@): - packet mode should be set to true in image, until properly fetched from the kernel - verify image data on retrieval Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> CC: Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
When we will be restoring ttys we need that restore procedure for master peers will be yielded earlier than for slave peers due to ttys specifics. With this commit we introduce @tty_slaves list which will allow us to order tty file restore procesure. Because we need to fetch which list to be used depending on tty type this patch extend select_ps_list with fdinfo_list_entry parameter. v2 (by xemul@): - make sure the epoll list is still last Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This is normal situation -- eventpoll fd may have no fds attached thus resulting in empty fdinfo file. Report OK in that case. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Otherwise a transport fd may be added to eventfd... Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It will be used for restoring epollfd. Currently a transport fd may be added to epollfd. epollfd should be populated, when all descriptors were already received. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
I tried to fix that by: commit bc2ac71c Author: Andrey Vagin <avagin@openvz.org> Date: Wed Sep 12 15:16:39 2012 +0400 sk-unix: don't add a socket in a second time but made a mistake and now a peer would be added only if it's in a list. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Before we checked only one connection. With this patch the test reproduces a bug: Error (sk-unix.c:395): BUG at sk-unix.c:395 Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
A socket can be added in a list two times, if two other sockets are connected to it. This patch fixes a problem: Error (sk-unix.c:395): BUG at sk-unix.c:395 Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
* A message about external sockets is printed before any action. * Add a message, when a peer is added in a list of sockets. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Konstantin Khlebnikov authored
$ make cleanout stop rm -f -r *.pid *.out* *.test* *.state ./conntracks --statefile=conntracks.state --outfile=conntracks.out start make: *** [conntracks.state] Error 1 Signed-off-by:
Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Konstantin Khlebnikov authored
`< $FILE` isn't posix compatible and doesn't work in dash Signed-off-by:
Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Konstantin Khlebnikov authored
fix obvious bashisms to make script more portable Signed-off-by:
Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Konstantin Khlebnikov authored
Linux has it since v3.2 cc -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -I../../lib packet_sock.c ../../lib/libzdtmtst.a -o packet_sock packet_sock.c:70:8: error: redefinition of ‘struct tpacket_req3’ In file included from packet_sock.c:23:0: /usr/include/linux/if_packet.h:245:8: note: originally defined here Signed-off-by:
Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Konstantin Khlebnikov authored
On some systems PAGE_SIZE is declared as sysconf(_SC_PAGESIZE) in <sys/user.h> this is non-constant expression, so it cannot be used in type declarations. cc -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -c -o ns.o ns.c ns.c:124:7: error: variably modified ‘stack’ at file scope Signed-off-by:
Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Konstantin Khlebnikov authored
cc -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -c -o msg.o msg.c msg.c: In function ‘test_msg’: msg.c:40:6: error: variable ‘len’ set but not used [-Werror=unused-but-set-variable] Signed-off-by:
Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 11 Sep, 2012 5 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Check for post_open callback presense before any other checks. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Same again -- for code to be cleaner. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Just for cleaner (from my pov) code. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-