jengyic / slowhttptest

Automatically exported from code.google.com/p/slowhttptest
Apache License 2.0
1 stars 0 forks source link

Option - requires an argument. #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
After installation just enter "slowhttptest -u https://www.google.at or 
anything of the Wiki tutorials. 

What is the expected output? What do you see instead?
root@xfs:~# slowhttptest -u https://www.google.at
Option - requires an argument.
Try 'slowhttptest -h' for more information

What version of the product are you using? On what operating system?
newest version. clean Xubuntu

Original issue reported on code.google.com by insidiou...@gmail.com on 26 Nov 2013 at 2:36

GoogleCodeExporter commented 9 years ago
Please check the charset/lang you are using in the terminal... Cannot reproduce 
this completely on OSX. Will try on clean Ubuntu in about an hour. 

Original comment by shek...@gmail.com on 26 Nov 2013 at 4:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This is probably related to getopt version on your system. Is it different from 
2.20.1? 
I noticed that if you use long dash, e.g. 
src/slowhttptest —u http://www.google.at/ 
instead of
src/slowhttptest -u http://www.google.at/
you will get wrong results. But with my current version of getopt, I have no 
idea how to get an error message like "Option - requires an argument.". Please 
try both variants and also type getopt --version to the system version of 
getopt that you have. 
Thanks!

Original comment by shek...@gmail.com on 26 Nov 2013 at 9:48

GoogleCodeExporter commented 9 years ago
I am sorry, I made a mistake.
The system is on a cubieboard either a debian Wheezy or a Kali linux ARM.
on both systems on the cubieboard this happenes.

getopt is 2.20.1.

I am accessing the cubieboard with putty via ssh.
I cannot write a long dash, even copy paste is not working. The short dash is 
working but bringing the error message.

Original comment by insidiou...@gmail.com on 27 Nov 2013 at 4:09

GoogleCodeExporter commented 9 years ago
One more thing - have you tried older versions on the same system?

Original comment by shek...@gmail.com on 27 Nov 2013 at 4:10

GoogleCodeExporter commented 9 years ago
Tried 1.5 (without prefix) same error:

root@kali:~/slowhttptest-1.5# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for SSL_library_init in -lssl... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for vprintf... yes
checking for _doprnt... no
checking for atexit... yes
checking for gettimeofday... yes
checking for poll... yes
checking for select... yes
checking for socket... yes
checking for strerror... yes
checking for strstr... yes
checking for strtol... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating config.h
config.status: executing depfiles commands
root@kali:~/slowhttptest-1.5# make
make  all-recursive
make[1]: Entering directory `/root/slowhttptest-1.5'
Making all in src
make[2]: Entering directory `/root/slowhttptest-1.5/src'
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowhttptestmain.o -MD -MP -MF 
.deps                                                                           
  /slowhttptestmain.Tpo -c -o slowhttptestmain.o slowhttptestmain.cc
mv -f .deps/slowhttptestmain.Tpo .deps/slowhttptestmain.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowhttptest.o -MD -MP -MF 
.deps/slo                                                                       
      whttptest.Tpo -c -o slowhttptest.o slowhttptest.cc
mv -f .deps/slowhttptest.Tpo .deps/slowhttptest.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowsocket.o -MD -MP -MF 
.deps/slows                                                                     
        ocket.Tpo -c -o slowsocket.o slowsocket.cc
mv -f .deps/slowsocket.Tpo .deps/slowsocket.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowstats.o -MD -MP -MF 
.deps/slowstats.Tpo -c -o slowstats.o slowstats.cc
mv -f .deps/slowstats.Tpo .deps/slowstats.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowurl.o -MD -MP -MF 
.deps/slowurl.Tpo -c -o slowurl.o slowurl.cc
mv -f .deps/slowurl.Tpo .deps/slowurl.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowlog.o -MD -MP -MF 
.deps/slowlog.Tpo -c -o slowlog.o slowlog.cc
mv -f .deps/slowlog.Tpo .deps/slowlog.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT text-generator.o -MD -MP -MF 
.deps/text-generator.Tpo -c -o text-generator.o text-generator.cc
mv -f .deps/text-generator.Tpo .deps/text-generator.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT range-generator.o -MD -MP -MF 
.deps/range-generator.Tpo -c -o range-generator.o range-generator.cc
mv -f .deps/range-generator.Tpo .deps/range-generator.Po
g++  -g -O2  -L/usr/local/lib -lssl -o slowhttptest slowhttptestmain.o 
slowhttptest.o slowsocket.o slowstats.o slowurl.o slowlog.o text-generator.o 
range-generator.o  -lssl
make[2]: Leaving directory `/root/slowhttptest-1.5/src'
Making all in man
make[2]: Entering directory `/root/slowhttptest-1.5/man'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/root/slowhttptest-1.5/man'
make[2]: Entering directory `/root/slowhttptest-1.5'
make[2]: Leaving directory `/root/slowhttptest-1.5'
make[1]: Leaving directory `/root/slowhttptest-1.5'

root@kali:~/slowhttptest-1.5/src# ./slowhttptest -u www.google.at
Option - requires an argument.
Try 'slowhttptest -h' for more information

Original comment by insidiou...@gmail.com on 27 Nov 2013 at 7:38

GoogleCodeExporter commented 9 years ago
and 1.3:

root@kali:~/slowhttptest-1.3# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for SSL_library_init in -lssl... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for vprintf... yes
checking for _doprnt... no
checking for atexit... yes
checking for gettimeofday... yes
checking for select... yes
checking for socket... yes
checking for strerror... yes
checking for strstr... yes
checking for strtol... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
root@kali:~/slowhttptest-1.3# make
make  all-recursive
make[1]: Entering directory `/root/slowhttptest-1.3'
Making all in src
make[2]: Entering directory `/root/slowhttptest-1.3/src'
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowhttptestmain.o -MD -MP -MF 
.deps/slowhttptestmain.Tpo -c -o slowhttptestmain.o slowhttptestmain.cc
mv -f .deps/slowhttptestmain.Tpo .deps/slowhttptestmain.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowhttptest.o -MD -MP -MF 
.deps/slowhttptest.Tpo -c -o slowhttptest.o slowhttptest.cc
mv -f .deps/slowhttptest.Tpo .deps/slowhttptest.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowsocket.o -MD -MP -MF 
.deps/slowsocket.Tpo -c -o slowsocket.o slowsocket.cc
mv -f .deps/slowsocket.Tpo .deps/slowsocket.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowstats.o -MD -MP -MF 
.deps/slowstats.Tpo -c -o slowstats.o slowstats.cc
mv -f .deps/slowstats.Tpo .deps/slowstats.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowurl.o -MD -MP -MF 
.deps/slowurl.Tpo -c -o slowurl.o slowurl.cc
mv -f .deps/slowurl.Tpo .deps/slowurl.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT slowlog.o -MD -MP -MF 
.deps/slowlog.Tpo -c -o slowlog.o slowlog.cc
mv -f .deps/slowlog.Tpo .deps/slowlog.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT text-generator.o -MD -MP -MF 
.deps/text-generator.Tpo -c -o text-generator.o text-generator.cc
mv -f .deps/text-generator.Tpo .deps/text-generator.Po
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT range-generator.o -MD -MP -MF 
.deps/range-generator.Tpo -c -o range-generator.o range-generator.cc
mv -f .deps/range-generator.Tpo .deps/range-generator.Po
g++  -g -O2  -L/usr/local/lib -lssl -o slowhttptest slowhttptestmain.o 
slowhttptest.o slowsocket.o slowstats.o slowurl.o slowlog.o text-generator.o 
range-generator.o  -lssl
make[2]: Leaving directory `/root/slowhttptest-1.3/src'
make[2]: Entering directory `/root/slowhttptest-1.3'
make[2]: Leaving directory `/root/slowhttptest-1.3'
make[1]: Leaving directory `/root/slowhttptest-1.3'
root@kali:~/slowhttptest-1.3# cd src/
root@kali:~/slowhttptest-1.3/src# ./slowhttptest -u www.google.at
Option - requires an argument.
Try 'slowhttptest -h' for more information

Original comment by insidiou...@gmail.com on 27 Nov 2013 at 7:41

GoogleCodeExporter commented 9 years ago
--- slowhttptestmain.cc.orig    2014-06-02 17:46:55.097248033 +0900
+++ slowhttptestmain.cc 2014-06-02 17:47:11.177248040 +0900
@@ -158,7 +158,7 @@
   SlowTestType type = slowhttptest::eHeader;
   ProxyType proxy_type = slowhttptest::eNoProxy;
   long tmp;
-  char o;
+  int o;
   while((o = getopt(argc, argv, ":HBRXgha:b:c:d:e:i:k:l:n:o:p:r:s:t:u:v:w:x:y:z:")) != -1) {
     switch (o) {
       case 'a':

Original comment by g41...@gmail.com on 2 Jun 2014 at 8:59