test_be_ptask.c revision babaca78cc196e7e0dcc3e972347951a081159f2
6N/A Pavel Březina <pbrezina@redhat.com> 6N/A Copyright (C) 2014 Red Hat 6N/A This program is free software; you can redistribute it and/or modify 6N/A it under the terms of the GNU General Public License as published by 6N/A the Free Software Foundation; either version 3 of the License, or 6N/A (at your option) any later version. 6N/A This program is distributed in the hope that it will be useful, 6N/A but WITHOUT ANY WARRANTY; without even the implied warranty of 6N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6N/A GNU General Public License for more details. 6N/A You should have received a copy of the GNU General Public License 6N/A/* Since both test_ctx->done and ptask->req is marked as finished already 6N/A * in the sync _send function before a new execution is scheduled we need to 6N/A * rely on the fact that ptask->req is set to zero when a new timer is 6N/A * created. This way we guarantee that the condition is true only when 6N/A * the ptask is executed and a new one is scheduled. */ 6N/A/* Mock few backend functions so we don't have to bring the whole 6N/A * data provider into this test. */ 6N/A /* we won't finish the request */ 6N/A /* create be_ctx, only ev and offline field should be used */ /* first iterate until the task is executed */ /* then iterate until the request is destroyed */ /* Set debug level to invalid value so we can deside if -d 0 was used. */