aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-06-02 11:57:42 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-06-02 11:57:42 +0300
commit685600d72b0c300f94c0c69dc0a16c4ebb230a21 (patch)
tree3a3ea6f43a8cdc543118e2cf81d29628dc82f61f /src
parentcc298a11a131b162f291d6ee27ba1d7598a1b6c4 (diff)
downloadpies-685600d72b0c300f94c0c69dc0a16c4ebb230a21.tar.gz
pies-685600d72b0c300f94c0c69dc0a16c4ebb230a21.tar.bz2
Rewrite the testsuite
The aim is to run pies in foreground if possible. Limit execution time using external wrapper. * src/pies.c: (_cb_redir): Consistently return 1 on errors. * tests/aux/sleepexit: New file. * tests/aux/startcheck: New file. * tests/aux/touchfile: Change arguments. * tests/aux/respawn: Rewrite. * tests/lines.c: New noinst program. * tests/to.c: New noinst program. * tests/.gitignore: Add new programs. * tests/Makefile.am: Update. * tests/env.at: Use to to avoid hanging forever. Add missing popdef. * tests/redirect.at: Use echo as component program. * tests/respawn.at: Run pies in foreground. Use to to limit execution time. * tests/shell.at: Likewise. * tests/shutdown.at: Likewise. * tests/startup.at: Likewise. * tests/ret-exec.at: Use sleepexit as component program. * tests/ret-notify.at: Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/pies.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pies.c b/src/pies.c
index 39467a2..2387cef 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -928,14 +928,14 @@ _cb_redir (enum grecs_callback_command cmd,
928 { 928 {
929 grecs_error (locus, 0, _("unknown syslog priority %s"), 929 grecs_error (locus, 0, _("unknown syslog priority %s"),
930 value->v.string); 930 value->v.string);
931 return 0; 931 return 1;
932 } 932 }
933 break; 933 break;
934 934
935 case GRECS_TYPE_ARRAY: 935 case GRECS_TYPE_ARRAY:
936 if (assert_grecs_value_type (locus, value->v.arg.v[0], 936 if (assert_grecs_value_type (locus, value->v.arg.v[0],
937 GRECS_TYPE_STRING)) 937 GRECS_TYPE_STRING))
938 return 0; 938 return 1;
939 if (strtotok (redirtab, value->v.arg.v[0]->v.string, &res)) 939 if (strtotok (redirtab, value->v.arg.v[0]->v.string, &res))
940 grecs_error (locus, 0, _("%s: unrecognised redirector type"), 940 grecs_error (locus, 0, _("%s: unrecognised redirector type"),
941 value->v.arg.v[0]->v.string); 941 value->v.arg.v[0]->v.string);
@@ -946,11 +946,11 @@ _cb_redir (enum grecs_callback_command cmd,
946 if (value->v.arg.c != 2) 946 if (value->v.arg.c != 2)
947 { 947 {
948 grecs_error (locus, 0, _("wrong number of arguments")); 948 grecs_error (locus, 0, _("wrong number of arguments"));
949 return 0; 949 return 1;
950 } 950 }
951 if (assert_grecs_value_type (locus, value->v.arg.v[1], 951 if (assert_grecs_value_type (locus, value->v.arg.v[1],
952 GRECS_TYPE_STRING)) 952 GRECS_TYPE_STRING))
953 return 0; 953 return 1;
954 954
955 switch (res) 955 switch (res)
956 { 956 {
@@ -964,7 +964,7 @@ _cb_redir (enum grecs_callback_command cmd,
964 grecs_error (locus, 0, 964 grecs_error (locus, 0,
965 _("unknown syslog priority %s"), 965 _("unknown syslog priority %s"),
966 value->v.arg.v[1]->v.string); 966 value->v.arg.v[1]->v.string);
967 return 0; 967 return 1;
968 } 968 }
969 break; 969 break;
970 970

Return to:

Send suggestions and report system problems to the System administrator.