summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-05-26 07:24:47 +0200
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-05-26 07:24:47 +0200
commit14ab49d9854fed22e5a571603da805913d12f45c (patch)
tree82a88036076f5a215162ac997a833df7ce7e42d3 /tests
parent233eb5c510d599760f5939938e97a2ab79ecf75b (diff)
test_vt: use new uterm vt master
Use uterm vt master to allocate an VT on seat0 for testing purposes. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_vt.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/test_vt.c b/tests/test_vt.c
index 38516f2..2b347fa 100644
--- a/tests/test_vt.c
+++ b/tests/test_vt.c
@@ -42,28 +42,29 @@
#include "eloop.h"
#include "log.h"
-#include "vt.h"
+#include "uterm.h"
#include "test_include.h"
int main(int argc, char **argv)
{
int ret;
struct ev_eloop *eloop;
- struct kmscon_vt *vt;
+ struct uterm_vt_master *vtm;
+ struct uterm_vt *vt;
ret = test_prepare(argc, argv, &eloop);
if (ret)
goto err_fail;
- ret = kmscon_vt_new(&vt, NULL, NULL);
+ ret = uterm_vt_master_new(&vtm, eloop);
if (ret)
goto err_exit;
- ret = kmscon_vt_open(vt, KMSCON_VT_NEW, eloop);
+ ret = uterm_vt_allocate(vtm, &vt, NULL, NULL, NULL);
if (ret)
- goto err_vt;
+ goto err_vtm;
- ret = kmscon_vt_enter(vt);
+ ret = uterm_vt_activate(vt);
if (ret)
log_warn("Cannot switch to VT");
@@ -72,12 +73,13 @@ int main(int argc, char **argv)
log_debug("Terminating\n");
/* switch back to previous VT but wait for eloop to process SIGUSR0 */
- ret = kmscon_vt_leave(vt);
+ ret = uterm_vt_deactivate(vt);
if (ret == -EINPROGRESS)
ev_eloop_run(eloop, 50);
-err_vt:
- kmscon_vt_unref(vt);
+ uterm_vt_unref(vt);
+err_vtm:
+ uterm_vt_master_unref(vtm);
err_exit:
test_exit(eloop);
err_fail: