diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-04-26 19:18:26 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-04-26 19:18:26 +0300 |
commit | 31a028f8992e6b48eb72ea8028b6248a67291bde (patch) | |
tree | 0f7d6f4f9566d45ab0b9bffe4370e0eaa51eb6a4 /tests | |
parent | 3919929d5af04f670607b04cf11f9f7c6e409445 (diff) | |
download | wydawca-31a028f8992e6b48eb72ea8028b6248a67291bde.tar.gz wydawca-31a028f8992e6b48eb72ea8028b6248a67291bde.tar.bz2 |
Add missing descriptions to the test programs
Diffstat (limited to 'tests')
-rw-r--r-- | tests/chargen.c | 17 | ||||
-rw-r--r-- | tests/wyasync.c | 83 | ||||
-rw-r--r-- | tests/wyclt.c | 39 | ||||
-rw-r--r-- | tests/wyinit.c | 28 |
4 files changed, 117 insertions, 50 deletions
diff --git a/tests/chargen.c b/tests/chargen.c index 13ef8f5..89fb355 100644 --- a/tests/chargen.c +++ b/tests/chargen.c @@ -19,6 +19,23 @@ -p Produce only printable characters -s N Start from character with ordinal number N + + LICENSE + Copyright (C) 2020 Sergey Poznyakoff + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program. If not, see <http://www.gnu.org/licenses/>. + */ #include <stdio.h> #include <stdlib.h> diff --git a/tests/wyasync.c b/tests/wyasync.c index 2664cf1..af7963b 100644 --- a/tests/wyasync.c +++ b/tests/wyasync.c @@ -1,61 +1,60 @@ -/* wydawca - automatic release submission daemon - Copyright (C) 2020 Sergey Poznyakoff - - Wydawca is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3 of the License, or (at your - option) any later version. - - Wydawca is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with wydawca. If not, see <http://www.gnu.org/licenses/>. */ - /* NAME - wyasync - wydawca inotify test tool + wyasync - wydawca inotify test tool SYNOPSIS - wyasync [OPTIONS] -- COMMAND + wyasync [OPTIONS] -- COMMAND DESCRIPTION - Starts two programs: wydawca in foreground mode, and COMMAND. Waits for - COMMAND to terminate, shuts down wydawca and exits with the exit code of - COMMAND. + Starts two programs: wydawca in foreground mode, and COMMAND. Waits for + COMMAND to terminate, shuts down wydawca and exits with the exit code of + COMMAND. OPTIONS - -c FILE - Name of the configuration file. + -c FILE + Name of the configuration file. - -p NAME - Full pathname of the "wydawca" binary. + -p NAME + Full pathname of the "wydawca" binary. - -t N - Time allotted for the COMMAND to terminate. Default is 60 seconds. + -t N + Time allotted for the COMMAND to terminate. Default is 60 seconds. - -w ARG - Pass ARG to wydawca verbatim. + -w ARG + Pass ARG to wydawca verbatim. EXIT STATUS - On error conditions, exits with the following codes: + On error conditions, exits with the following codes: - 64 - Command line usage error. - 65 - wydawca terminated prematurely. - 66 - COMMAND timed out. - 67 - Operating system error (can't open file, dup fd, etc). - 68 - Internal software error. + 64 + Command line usage error. + 65 + wydawca terminated prematurely. + 66 + COMMAND timed out. + 67 + Operating system error (can't open file, dup fd, etc). + 68 + Internal software error. - On success, exits with the exit code of COMMAND. The latter should not - use exit codes described above. + On success, exits with the exit code of COMMAND. The latter should not + use exit codes described above. + LICENSE + Copyright (C) 2020 Sergey Poznyakoff + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdlib.h> diff --git a/tests/wyclt.c b/tests/wyclt.c index f9f2d38..ae8ccbf 100644 --- a/tests/wyclt.c +++ b/tests/wyclt.c @@ -1,3 +1,42 @@ +/* + NAME + wyclt - simple client for wydawca legacy upload notification protocol + + SYNOPSIS + wyclt [-w T] SOCKET SPOOL + + DESCRIPTION + Connects to wydawca server listening on UNIX socket SOCKET and sends + it upload notification request for SPOOL. + + OPTIONS + -w T + Sleep for T seconds between opening the socket and sending the + request. This is used to test idle timeout in wydawca server. + + EXIT CODES + 0 success + 1 command line usage error + 2 SIGPIPE received (the word "SIGPIPE" is printed on stderr) + + On any exceptional condition, abort(3) is called. + + LICENSE + Copyright (C) 2020 Sergey Poznyakoff + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program. If not, see <http://www.gnu.org/licenses/>. +*/ #include <config.h> #include <stdlib.h> #include <stdio.h> diff --git a/tests/wyinit.c b/tests/wyinit.c index f5f0302..794f0b3 100644 --- a/tests/wyinit.c +++ b/tests/wyinit.c @@ -1,17 +1,30 @@ /* NAME - - wyinit - initialize wydawca testsuite directories + wyinit - initialize wydawca testsuite directories SYNOPSIS - - wyinit FILE + wyinit FILE DESCRIPTION + Parses wydawca configuration file FILE. For each "spool" statement + found, ensures that the directories listed in its "source" and + "destination" keywords exist. Creates missing directories. + + LICENSE + Copyright (C) 2020 Sergey Poznyakoff + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or (at your + option) any later version. - Parses wydawca configuration file FILE. For each "source" and "destination" - keyword found, ensures that its argument exists and is a directory. Creates - missing directories. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> @@ -88,7 +101,6 @@ makehier(struct grecs_node *tree, char *path) grecs_match_buf_free(match_buf); } - int main(int argc, char **argv) { |