mirror of
https://github.com/troglobit/finit.git
synced 2026-11-08 16:11:10 +00:00
Further box-in testserv so it doesn't conflict with other serv tests
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
3bd15a53d6
commit
c26dded49c
2 files changed
+10
-4
No files matched your search
+2
-2
@@ -36,7 +36,7 @@
|
|||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
|
||||||
#define SERV_DAEMON "serv"
|
#define SERV_DAEMON "serv"
|
||||||
#define SERV_ARGS "-n -p"
|
#define SERV_ARGS "-n -p -i testserv"
|
||||||
#define SERV_DESC "Test serv daemon"
|
#define SERV_DESC "Test serv daemon"
|
||||||
|
|
||||||
static void setup(void *arg)
|
static void setup(void *arg)
|
||||||
@@ -66,7 +66,7 @@ static void setup(void *arg)
|
|||||||
mksubsys("/tmp/serv", 0755, "root", "root");
|
mksubsys("/tmp/serv", 0755, "root", "root");
|
||||||
umask(prev);
|
umask(prev);
|
||||||
|
|
||||||
snprintf(line, sizeof(line), "[S123456789] pid:!/run/serv.pid cgroup.system %s %s -- %s",
|
snprintf(line, sizeof(line), "[S123456789] name:testserv pid:!/run/testserv.pid <boot/testserv> cgroup.system %s %s -- %s",
|
||||||
cmd, SERV_ARGS, SERV_DESC);
|
cmd, SERV_ARGS, SERV_DESC);
|
||||||
|
|
||||||
if (service_register(SVC_TYPE_SERVICE, line, global_rlimit, NULL))
|
if (service_register(SVC_TYPE_SERVICE, line, global_rlimit, NULL))
|
||||||
|
|||||||
+8
-2
@@ -1,15 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Verify service readiness notification
|
# Verify service readiness notification
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
#set -x
|
#set -x
|
||||||
TEST_DIR=$(dirname "$0")
|
|
||||||
#DEBUG=true
|
#DEBUG=true
|
||||||
|
FINIT_ARGS="finit.cond=testserv"
|
||||||
|
TEST_DIR=$(dirname "$0")
|
||||||
|
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
. "$TEST_DIR/tenv/lib.sh"
|
. "$TEST_DIR/tenv/lib.sh"
|
||||||
|
|
||||||
|
run "initctl"
|
||||||
|
run "initctl status testserv"
|
||||||
|
run "initctl cond dump"
|
||||||
sleep 1
|
sleep 1
|
||||||
retry 'assert_norestart serv' 1 1
|
retry 'assert_norestart testserv' 1 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
Reference in new issue
Block a user