Changeset View
Changeset View
Standalone View
Standalone View
devel/nspr/files/patch-tests
--- lib/tests/Makefile.in.orig 2019-10-15 14:21:38 UTC | --- lib/tests/Makefile.in.orig 2019-10-15 14:21:38 UTC | ||||
+++ lib/tests/Makefile.in | +++ lib/tests/Makefile.in | ||||
@@ -159,7 +159,7 @@ else | @@ -159,7 +159,7 @@ else | ||||
ifeq ($(OS_ARCH),OS2) | ifeq ($(OS_ARCH),OS2) | ||||
$(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) | $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) | ||||
else | else | ||||
- $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(EXTRA_LIBS) -o $@ | - $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(EXTRA_LIBS) -o $@ | ||||
+ $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) -o $@ | + $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) -o $@ | ||||
endif | endif | ||||
endif | endif | ||||
endif | endif | ||||
--- pr/tests/Makefile.in.orig 2019-10-15 14:21:38 UTC | |||||
+++ pr/tests/Makefile.in | |||||
@@ -442,17 +442,18 @@ endif | |||||
ALWAYS: | |||||
runtests:: $(PROGS) ALWAYS | |||||
- @$(ECHO) "\nNSPR Test Results - $(OBJDIR)\n" | |||||
- @$(ECHO) "BEGIN\t\t\t`date`" | |||||
- @$(ECHO) "NSPR_TEST_LOGFILE\t$(LOGFILE)\n" | |||||
- @$(ECHO) "Test\t\t\tResult\n" | |||||
+ @$(ECHO) "NSPR Test Results - $(OBJDIR)" | |||||
+ @$(ECHO) "BEGIN `date`" | |||||
+ @$(ECHO) "Test Result" | |||||
@cd $(OBJDIR); for i in $(PROGRAMS); do \ | |||||
- $(ECHO) "$$i\c"; \ | |||||
- ./$$i >> $(LOGFILE) 2>&1 ; \ | |||||
+ printf "$$i"; \ | |||||
+ ./$$i > $$i.output 2>&1; \ | |||||
if [ 0 = $$? ] ; then \ | |||||
- $(ECHO) "\t\t\tPassed"; \ | |||||
- else \ | |||||
- $(ECHO) "\t\t\tFAILED"; \ | |||||
- fi; \ | |||||
+ $(ECHO) " Passed"; \ | |||||
+ rm $$i.output; \ | |||||
+ else \ | |||||
+ $(ECHO) " FAILED"; \ | |||||
+ cat $$i.output; \ | |||||
+ fi; \ | |||||
done | |||||
- @$(ECHO) "\nEND\t\t`date`\n" | |||||
+ @$(ECHO) "END `date`" | |||||
--- pr/tests/cleanup.c.orig 2019-10-15 14:21:38 UTC | --- pr/tests/cleanup.c.orig 2019-10-15 14:21:38 UTC | ||||
+++ pr/tests/cleanup.c | +++ pr/tests/cleanup.c | ||||
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||||
static void PR_CALLBACK Thread(void *sleep) | static void PR_CALLBACK Thread(void *sleep) | ||||
{ | { | ||||
- PR_Sleep(PR_SecondsToInterval((PRUint32)sleep)); | - PR_Sleep(PR_SecondsToInterval((PRUint32)sleep)); | ||||
+ PR_Sleep(PR_SecondsToInterval((intptr_t)sleep)); | + PR_Sleep(PR_SecondsToInterval((intptr_t)sleep)); | ||||
▲ Show 20 Lines • Show All 985 Lines • ▼ Show 20 Lines | @@ -414,7 +414,7 @@ int main(int argc, char **argv) | ||||
} | } | ||||
} | } | ||||
if (debug_mode) printf( | if (debug_mode) printf( | ||||
- "%s: [%ld [%ld] %ld] writes/sec average\n", | - "%s: [%ld [%ld] %ld] writes/sec average\n", | ||||
+ "%s: [%d [%d] %d] writes/sec average\n", | + "%s: [%d [%d] %d] writes/sec average\n", | ||||
programName, writesMin, writesTot * 1000 / durationTot, writesMax); | programName, writesMin, writesTot * 1000 / durationTot, writesMax); | ||||
PR_DestroyCondVar(cv); | PR_DestroyCondVar(cv); | ||||
--- pr/tests/runtests.sh.orig 2019-08-19 14:12:12 UTC | --- pr/tests/runtests.sh.orig 2020-01-31 20:37:50.000000000 +0000 | ||||
+++ pr/tests/runtests.sh | +++ pr/tests/runtests.sh 2020-02-01 22:39:16.320853988 +0000 | ||||
@@ -56,9 +56,6 @@ fi | @@ -226,7 +226,7 @@ OBJDIR=`basename $PWD` | ||||
# Tests not run (but should) | |||||
# | |||||
-#forktest (failed on IRIX) | |||||
-#nbconn - fails on some platforms | |||||
-#poll_er - fails on some platforms? limited use? | |||||
#prpoll - the bad-FD test needs to be moved to a different test | |||||
#sleep - specific to OS/2 | |||||
@@ -91,6 +88,7 @@ exit | |||||
fdcach | |||||
fileio | |||||
foreign | |||||
+forktest | |||||
formattm | |||||
fsync | |||||
gethost | |||||
@@ -98,7 +96,6 @@ getproto | |||||
i2l | |||||
initclk | |||||
inrval | |||||
-instrumt | |||||
intrio | |||||
intrupt | |||||
io_timeout | |||||
@@ -119,6 +116,7 @@ logger | |||||
many_cv | |||||
multiwait | |||||
nameshm1 | |||||
+nbconn | |||||
nblayer | |||||
nonblock | |||||
ntioto | |||||
@@ -135,6 +133,7 @@ perf | |||||
pipeping | |||||
pipeping2 | |||||
pipeself | |||||
+poll_er | |||||
poll_nm | |||||
poll_to | |||||
pollable | |||||
@@ -207,7 +206,7 @@ OBJDIR=`basename $PWD` | |||||
printf "\nNSPR Test Results - $OBJDIR\n\n" | printf "\nNSPR Test Results - $OBJDIR\n\n" | ||||
printf "BEGIN\t\t\t`date`\n" | printf "BEGIN\t\t\t`date`\n" | ||||
printf "NSPR_TEST_LOGFILE\t${LOGFILE}\n\n" | printf "NSPR_TEST_LOGFILE\t${LOGFILE}\n\n" | ||||
-printf "Test\t\t\tResult\n\n" | -printf "Test\t\t\tResult\n\n" | ||||
+printf " Test\t\t\tResult\n\n" | +printf " Test\t\t\tResult\n\n" | ||||
if [ $OS_PLATFORM = "Windows_95" ] || [ $OS_PLATFORM = "Windows_98" ] || [ $OS_PLATFORM = "Windows_NT" ] || [ $OS_PLATFORM = "OS/2" ] ; then | if [ $OS_PLATFORM = "Windows_95" ] || [ $OS_PLATFORM = "Windows_98" ] || [ $OS_PLATFORM = "Windows_NT" ] || [ $OS_PLATFORM = "OS/2" ] ; then | ||||
for prog in $TESTS | for prog in $TESTS | ||||
do | do | ||||
@@ -225,10 +224,8 @@ if [ $OS_PLATFORM = "Windows_95" ] || [ $OS_PLATFORM = | @@ -244,10 +244,8 @@ if [ $OS_PLATFORM = "Windows_95" ] || [ $OS_PLATFORM = | ||||
else | else | ||||
for prog in $TESTS | for prog in $TESTS | ||||
do | do | ||||
- printf "$prog" | - printf "$prog (`date +%T`)" | ||||
- printf "\nBEGIN TEST: $prog\n\n" >> ${LOGFILE} 2>&1 | - printf "\nBEGIN TEST: $prog\n\n" >> ${LOGFILE} 2>&1 | ||||
- export test_rval | - export test_rval | ||||
- ./$prog >> ${LOGFILE} 2>&1 & | - ./$prog >> ${LOGFILE} 2>&1 & | ||||
+ printf %16s $prog | + printf %16s $prog | ||||
+ ./$prog >> $prog.output 2>&1 & | + ./$prog >> $prog.output 2>&1 & | ||||
test_pid=$! | test_pid=$! | ||||
sleep_pid=0 | sleep_pid=0 | ||||
if test -n "$TEST_TIMEOUT" && test "$TEST_TIMEOUT" -gt 0 | if test -n "$TEST_TIMEOUT" && test "$TEST_TIMEOUT" -gt 0 | ||||
@@ -243,28 +240,11 @@ else | @@ -262,9 +260,9 @@ else | ||||
printf "\t\t\tPassed\n"; | printf "\t\t\tPassed\n"; | ||||
else | else | ||||
printf "\t\t\tFAILED\n"; | printf "\t\t\tFAILED\n"; | ||||
+ sed "s,^, $prog: ," < $prog.output | + sed "s,^, $prog: ," < $prog.output | ||||
rval=1 | rval=1 | ||||
fi; | fi; | ||||
- printf "\nEND TEST: $prog\n\n" >> ${LOGFILE} 2>&1 | - printf "\nEND TEST: $prog\n\n" >> ${LOGFILE} 2>&1 | ||||
done | done | ||||
fi; | fi; | ||||
printf "END\t\t\t`date`\n" | --- pr/tests/sel_spd.c.orig 2020-01-31 20:37:50 UTC | ||||
exit $rval | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
- | |||||
--- pr/tests/sel_spd.c.orig 2019-10-15 14:21:38 UTC | |||||
+++ pr/tests/sel_spd.c | +++ pr/tests/sel_spd.c | ||||
@@ -15,23 +15,26 @@ | @@ -15,6 +15,9 @@ | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <errno.h> | #include <errno.h> | ||||
#include <string.h> | #include <string.h> | ||||
+#if defined(XP_UNIX) || defined(XP_OS2_EMX) | +#if defined(XP_UNIX) || defined(XP_OS2_EMX) | ||||
+# include <unistd.h> /* getopt(3) */ | +# include <unistd.h> /* getopt(3) */ | ||||
+#endif | +#endif | ||||
#define PORT_BASE 19000 | #ifdef DEBUG | ||||
#define PORT_INC_DO +100 | |||||
@@ -30,19 +33,19 @@ | |||||
#define PORT_BASE 19000 PORT_INC_DO PORT_INC_3264 | |||||
typedef struct timer_slot_t { | typedef struct timer_slot_t { | ||||
- unsigned long d_connect; | - unsigned long d_connect; | ||||
- unsigned long d_cl_data; | - unsigned long d_cl_data; | ||||
- unsigned long d_sv_data; | - unsigned long d_sv_data; | ||||
- unsigned long d_close; | - unsigned long d_close; | ||||
- unsigned long d_total; | - unsigned long d_total; | ||||
- unsigned long requests; | - unsigned long requests; | ||||
Show All 12 Lines | |||||
-static long _server_data = (128*1024); | -static long _server_data = (128*1024); | ||||
-static long _threads_max = 10, _threads = 10; | -static long _threads_max = 10, _threads = 10; | ||||
+static int _server_data = (128*1024); | +static int _server_data = (128*1024); | ||||
+static int _threads_max = 10, _threads = 10; | +static int _threads_max = 10, _threads = 10; | ||||
static int verbose=0; | static int verbose=0; | ||||
static PRMonitor *exit_cv; | static PRMonitor *exit_cv; | ||||
@@ -88,7 +91,7 @@ _server_thread(void *arg_id) | @@ -98,7 +101,7 @@ _server_thread(void *arg_id) | ||||
{ | |||||
void _client_thread(void *); | void _client_thread(void *); | ||||
PRThread *thread; | |||||
int *id = (int *)arg_id; | int *id = (int *)arg_id; | ||||
- PRFileDesc *sock; | - PRFileDesc *sock; | ||||
+ PRFileDesc *sock = NULL; | + PRFileDesc *sock = NULL; | ||||
PRSocketOptionData sockopt; | PRSocketOptionData sockopt; | ||||
PRNetAddr sa; | PRNetAddr sa; | ||||
PRFileDesc * newsock; | PRFileDesc * newsock; | ||||
@@ -467,12 +470,12 @@ void | @@ -476,12 +479,12 @@ void | ||||
tally_results(int verbose) | tally_results(int verbose) | ||||
{ | { | ||||
int index; | int index; | ||||
- unsigned long tot_connect = 0; | - unsigned long tot_connect = 0; | ||||
- unsigned long tot_cl_data = 0; | - unsigned long tot_cl_data = 0; | ||||
- unsigned long tot_sv_data = 0; | - unsigned long tot_sv_data = 0; | ||||
- unsigned long tot_close = 0; | - unsigned long tot_close = 0; | ||||
- unsigned long tot_all = 0; | - unsigned long tot_all = 0; | ||||
▲ Show 20 Lines • Show All 1,173 Lines • Show Last 20 Lines |