2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

zdtm: write some data in pipe and read it after suspend/resume

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2012-04-05 20:02:00 +04:00
committed by Pavel Emelyanov
parent 6e562b0c9c
commit 2fef5cacb5

View File

@@ -58,6 +58,11 @@ int main(int argc, char ** argv)
while (test_go())
;
ret = read(12, buf, sizeof(TEST_STRING));
if (ret != sizeof(TEST_STRING)) {
err("read failed: %d", ret);
goto err;
}
ret = write(11, TEST_STRING, sizeof(TEST_STRING));
if (ret != sizeof(TEST_STRING)) {
err("write failed: %d", ret);
@@ -82,6 +87,11 @@ int main(int argc, char ** argv)
pass();
} else {
ret = write(11, TEST_STRING, sizeof(TEST_STRING));
if (ret != sizeof(TEST_STRING)) {
err("write failed: %d", ret);
return 1;
}
ret = read(12, buf, sizeof(TEST_STRING));
if (ret != sizeof(TEST_STRING)) {
err("read failed: %d", ret);