aboutsummaryrefslogtreecommitdiff
path: root/src/proone-test_proto.c
diff options
context:
space:
mode:
authorDavid Timber <mieabby@gmail.com>2021-07-21 20:13:27 +1000
committerDavid Timber <mieabby@gmail.com>2021-07-21 20:40:53 +1000
commita0b92490365dc88d50c81780ff9ebb6ddb681e5e (patch)
treeeee136970e08263e1a5c4fc3288aa7f746111d97 /src/proone-test_proto.c
parent70b0ff657ab111b1718c159bdc6e1583330f9823 (diff)
Impl proone-htbtclient upbin, bug fixes ...
* Add prne_start_bin_rcb_compat() * PRNE_HTBT_OP_NY_BIN -> PRNE_HTBT_OP_UP_BIN. "nybin" is now the name of the file format * htbt * Fix broken hover redirection (HTBT_LMK_HOVER removed) * HTBT_MAIN_REQ_Q_SIZE * Impl PRNE_HTBT_OP_NOOP response * Fix PRNE_HTBT_OP_SOLICIT is always sent with id 1 * proone * Fix bugs caused by not scrubbing the shared global memory * Fix exec() fail when upbin request with args * Removed do_recombination() as it's not efficient. Now the authoritive end has to do the recombination * PRNE_HTBT_OP_RCB, PRNE_HTBT_STATUS_SUB reserved for future impl
Diffstat (limited to 'src/proone-test_proto.c')
-rw-r--r--src/proone-test_proto.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/proone-test_proto.c b/src/proone-test_proto.c
index e8c0ef8..c3f9934 100644
--- a/src/proone-test_proto.c
+++ b/src/proone-test_proto.c
@@ -2,6 +2,7 @@
#include "util_rt.h"
#include "config.h"
#include "dvault.h"
+#include "pack.h"
#include <string.h>
#include <assert.h>
@@ -17,11 +18,6 @@ static void test_enum (void);
int main (void) {
- // prne_arch_t string functions
- for (prne_arch_t i = PRNE_ARCH_NONE + 1; i < NB_PRNE_ARCH; i += 1) {
- assert(i == prne_arch_fstr(prne_arch_tostr(i)));
- }
-
test_ser();
test_enum();
@@ -545,6 +541,10 @@ static void test_ser (void) {
}
static void test_enum (void) {
+ for (prne_arch_t i = PRNE_ARCH_NONE + 1; i < NB_PRNE_ARCH; i += 1) {
+ assert(i == prne_arch_fstr(prne_arch_tostr(i)));
+ }
+
for (prne_arch_t i = 0; i < NB_PRNE_ARCH; i += 1) {
assert(prne_arch_tostr(i) != NULL);
}
@@ -554,4 +554,7 @@ static void test_enum (void) {
for (prne_htbt_op_t i = 0; i < NB_PRNE_HTBT_OP; i += 1) {
assert(prne_htbt_op_tostr(i) != NULL);
}
+ for (prne_pack_rc_t i = PRNE_PACK_RC_OK; i < NB_PRNE_PACK_RC; i += 1) {
+ assert(prne_pack_rc_tostr(i) != NULL);
+ }
}