Bug 6200 - short options sometimes do not work.
short options sometimes do not work.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: popt (Show other bugs)
6.1
All Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-10-21 17:41 EDT by jay
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-10-25 16:19:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jay 1999-10-21 17:41:27 EDT
popt does not parse short and long argument mixes properly.
these bugs do not manifest in rpm, since most people use a
single short opt, followed by lots of long opts.  this is
the case on intel linux and sparc solaris.

while using the popt library for a real world project (tm),
i discovered that it could not parse a mix of short options
and long options correctly.  the short options would fail
for some reason.

i have written a set of 8 addition unit tests for the popt
library.  they are in the form of another test program and
some param/answer files.  i have modified testit.sh to use
these tests.

three of my tests fail with popt 1.2, 1.3, and 1.4.  as i
read the docs and expect common sense to parse, the results
do not appear to be what i'd like them to be.

for test 33, my usage could be wrong, so that test might
have to be removed from my submission.  tests 29 and 36
definately output the incorrect results.

enclosed are my patches for the test programs the
demonstrate the bugs.  i do not have patches for the popt
library.
Comment 1 jay 1999-10-21 17:45:59 EDT
i hope word wrap doesn't kill this.....


diff -rN popt-1.4/Makefile.am popt.NEW/Makefile.am
14c14
< noinst_PROGRAMS = test1
---
> noinst_PROGRAMS = test1 test2
16a17,18
> test2_SOURCES = test2.c
> test2_LDADD = $(lib_LTLIBRARIES)
diff -rN popt-1.4/Makefile.in popt.NEW/Makefile.in
1c1
< # Makefile.in generated automatically by automake 1.4 from
Makefile.am
---
> # Makefile.in generated automatically by automake 1.4a from
Makefile.am
51c51
< INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
---
> INSTALL_PROGRAM = @INSTALL_PROGRAM@
53a54
> INSTALL_STRIP_FLAG =
91c92
< noinst_PROGRAMS = test1
---
> noinst_PROGRAMS = test1 test2
93a95,96
> test2_SOURCES = test2.c
> test2_LDADD = $(lib_LTLIBRARIES)
120a124,126
> test2_OBJECTS =  test2.o
> test2_DEPENDENCIES =  libpopt.la
> test2_LDFLAGS =
142,144c148,150
< .deps/popthelp.P .deps/poptparse.P .deps/test1.P
< SOURCES = $(libpopt_la_SOURCES) $(test1_SOURCES)
< OBJECTS = $(libpopt_la_OBJECTS) $(test1_OBJECTS)
---
> .deps/popthelp.P .deps/poptparse.P .deps/test1.P .deps/test2.P
> SOURCES = $(libpopt_la_SOURCES) $(test1_SOURCES) $(test2_SOURCES)
> OBJECTS = $(libpopt_la_OBJECTS) $(test1_OBJECTS) $(test2_OBJECTS)
264a271,274
> test2: $(test2_OBJECTS) $(test2_DEPENDENCIES)
> 	@rm -f test2
> 	$(LINK) $(test2_LDFLAGS) $(test2_OBJECTS) $(test2_LDADD) $(LIBS)
>
455c465
< 	    cp -pr $$/$$file $(distdir)/$$file; \
---
> 	    cp -pr $$d/$$file $(distdir)/$$file; \
530c540
< 	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
---
> 	$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
diff -rN popt-1.4/po/Makefile.in popt.NEW/po/Makefile.in
5c5
< LOCALEDIR=/usr/share/locale
---
> LOCALEDIR=/usr/local/share/locale
diff -rN popt-1.4/po/popt.pot popt.NEW/po/popt.pot
9c9
< "POT-Creation-Date: 1999-09-04 10:55-0400\n"
---
> "POT-Creation-Date: 1999-09-10 00:50-0400\n"
diff -rN popt-1.4/test-data/29.answer popt.NEW/test-data/29.answer
0a1,5
> dbusername txadmin	dbpassword txadmin666
> txhost quack.invengen.com	txsslport 443	txstoreid 400001
pathofkeyfile quack_flat_O.kf
> username dauser	password passwd	firstname first	lastname last
> addr1 addr1	addr2 addr2	city hoboken	state NJ	postal 07030
> country US	email null@usinteractive.com	dayphone 666.666.9999	fax
444.444.4444
diff -rN popt-1.4/test-data/29.param popt.NEW/test-data/29.param
0a1,7
> --keyfile=quack_flat_O.kf \
> --storeid=400001 --txhost=quack.invengen.com \
> --txsslport=443 --dbpassword=txadmin666 --dbusername=txadmin \
> -f first -l last --username=dauser --password=passwd \
> -1 addr1 -2 addr2 -c hoboken -s NJ -z 07030  -C US \
> -e null@usinteractive.com -d 666.666.9999 -F 444.444.4444
>
diff -rN popt-1.4/test-data/30.answer popt.NEW/test-data/30.answer
0a1,5
> dbusername txadmin	dbpassword txadmin666
> txhost quack.invengen.com	txsslport 443	txstoreid 400001
pathofkeyfile quack_flat_O.kf
> username someuser	password passwd	firstname first	lastname last
> addr1 addr1	addr2 addr2	city city	state NJ	postal 07999
> country US	email null@usinteractive.com	dayphone 666.666.9999	fax
444.444.4444
diff -rN popt-1.4/test-data/30.param popt.NEW/test-data/30.param
0a1,9
> --keyfile=quack_flat_O.kf \
> --storeid=400001 --txhost=quack.invengen.com \
> --txsslport=443 --dbpassword=txadmin666 --dbusername=txadmin \
> --first=first --last=last \
> --addr1=addr1 --addr2=addr2 --city=city --state=NJ --zip=07999 \
> --dayphone=666.666.9999 --fax=444.444.4444 --country=US \
> --email=null@usinteractive.com \
> --password=passwd \
> --username=someuser
diff -rN popt-1.4/test-data/31.answer popt.NEW/test-data/31.answer
0a1,5
> dbusername (null)	dbpassword (null)
> txhost (null)	txsslport 443	txstoreid 0	pathofkeyfile (null)
> username (null)	password (null)	firstname first	lastname last
> addr1 addr1	addr2 addr2	city hoboken	state NJ	postal 07030
> country US	email null@usinteractive.com	dayphone 666.666.9999	fax
444.444.4444
diff -rN popt-1.4/test-data/31.param popt.NEW/test-data/31.param
0a1,4
> -f first -l last \
> -1 addr1 -2 addr2 -c hoboken -s NJ -z 07030  -C US \
> -e null@usinteractive.com -d 666.666.9999 -F 444.444.4444
>
diff -rN popt-1.4/test-data/32.answer popt.NEW/test-data/32.answer
0a1,5
> dbusername (null)	dbpassword (null)
> txhost (null)	txsslport 443	txstoreid 0	pathofkeyfile (null)
> username (null)	password (null)	firstname (null)	lastname (null)
> addr1 (null)	addr2 (null)	city (null)	state (null)	postal 2222
> country (null)	email (null)	dayphone (null)	fax (null)
diff -rN popt-1.4/test-data/32.param popt.NEW/test-data/32.param
0a1
> --postal=1111 --zip=2222
diff -rN popt-1.4/test-data/33.answer popt.NEW/test-data/33.answer
0a1,5
> dbusername (null)	dbpassword (null)
> txhost (null)	txsslport 443	txstoreid 0	pathofkeyfile (null)
> username (null)	password (null)	firstname (null)	lastname (null)
> addr1 (null)	addr2 (null)	city (null)	state (null)	postal 2222
> country (null)	email (null)	dayphone (null)	fax (null)
diff -rN popt-1.4/test-data/33.param popt.NEW/test-data/33.param
0a1
> -P=1111 -z=2222
diff -rN popt-1.4/test-data/34.answer popt.NEW/test-data/34.answer
0a1,5
> dbusername (null)	dbpassword (null)
> txhost (null)	txsslport 443	txstoreid 0	pathofkeyfile (null)
> username (null)	password (null)	firstname (null)	lastname (null)
> addr1 (null)	addr2 (null)	city (null)	state (null)	postal 2222
> country (null)	email (null)	dayphone (null)	fax (null)
diff -rN popt-1.4/test-data/34.param popt.NEW/test-data/34.param
0a1
> -P 1111 -z 2222
diff -rN popt-1.4/test-data/35.answer popt.NEW/test-data/35.answer
0a1,5
> dbusername (null)	dbpassword (null)
> txhost (null)	txsslport 443	txstoreid 0	pathofkeyfile (null)
> username (null)	password (null)	firstname (null)	lastname (null)
> addr1 (null)	addr2 (null)	city (null)	state (null)	postal 8888
> country (null)	email (null)	dayphone (null)	fax (null)
diff -rN popt-1.4/test-data/35.param popt.NEW/test-data/35.param
0a1,2
> -P 1111 --postal=2222 -z 3333 --zip=4444 \
> -P 5555 -z 6666 --postal=7777 --zip=8888
diff -rN popt-1.4/test-data/36.answer popt.NEW/test-data/36.answer
0a1,5
> dbusername (null)	dbpassword (null)
> txhost (null)	txsslport 443	txstoreid 0	pathofkeyfile (null)
> username (null)	password (null)	firstname (null)	lastname (null)
> addr1 (null)	addr2 (null)	city (null)	state (null)	postal 8888
> country (null)	email (null)	dayphone (null)	fax (null)
diff -rN popt-1.4/test-data/36.param popt.NEW/test-data/36.param
0a1,2
> --postal=2222 -z 3333 --zip=4444 \
> -P 5555 -z 6666
diff -rN popt-1.4/test2.c popt.NEW/test2.c
0a1,145
> /*
>     Popt Library Test Program Number Too
>
>     --> "a real world test of popt bugs" <--
>
>     Copyright (C) 1999 US Interactive, Inc.
>
>     This program can be used under the GPL or LGPL at your
>     whim as long as this Copyright remains attached.
> */
>
> #include <stdio.h>
> #include <string.h>
> #include <popt.h>
>
> #define TEST2
>
> char *PathnameOfKeyFile		= NULL;
> char *PathnameOfOfferFile	= NULL;
>
> char *txHost			= NULL;
> int   txSslPort			= 443;
> int   txStoreId			= 0;
>
> char *contentProtocol		= NULL;
> char *contentHost		= NULL;
> int   contentPort		= 80;
> char *contentPath		= NULL;
>
> char *dbPassword		= NULL;
> char *dbUserName		= NULL;
>
> char *rcfile = "createuser-defaults";
> char *username=NULL;
>
> char *password			= NULL;
> char *firstname			= NULL;
> char *lastname			= NULL;
> char *addr1			= NULL;
> char *addr2			= NULL;
> char *city			= NULL;
> char *state			= NULL;
> char *postal			= NULL;
> char *country			= NULL;
>
> char *email			= NULL;
>
> char *dayphone			= NULL;
> char *fax			= NULL;
>
>
> int
> main(int argc, char**argv ) {
>
>     poptContext optCon;   /* context for parsing command-line
options */
>     struct poptOption userOptionsTable[] = {
>         { "first", 'f', POPT_ARG_STRING, &firstname, 0,
>             "user's first name", "first" },
>         { "last", 'l', POPT_ARG_STRING, &lastname, 0,
>             "user's last name", "last" },
>         { "username", 'u', POPT_ARG_STRING, &username, 0,
>             "system user name", "user" },
>         { "password", 'p', POPT_ARG_STRING, &password, 0,
>             "system password name", "password" },
>         { "addr1", '1', POPT_ARG_STRING, &addr1, 0,
>             "line 1 of address", "addr1" },
>         { "addr2", '2', POPT_ARG_STRING, &addr2, 0,
>             "line 2 of address", "addr2" },
>         { "city", 'c', POPT_ARG_STRING, &city, 0,
>             "city", "city" },
>         { "state", 's', POPT_ARG_STRING, &state, 0,
>             "state or province", "state" },
>         { "postal", 'P', POPT_ARG_STRING, &postal, 0,
>             "postal or zip code", "postal" },
>         { "zip", 'z', POPT_ARG_STRING, &postal, 0,
>             "postal or zip code", "postal" },
>         { "country", 'C', POPT_ARG_STRING, &country, 0,
>             "two letter ISO country code", "country" },
>         { "email", 'e', POPT_ARG_STRING, &email, 0,
>             "user's email address", "email" },
>         { "dayphone", 'd', POPT_ARG_STRING, &dayphone, 0,
>             "day time phone number", "dayphone" },
>         { "fax", 'F', POPT_ARG_STRING, &fax, 0,
>             "fax number", "fax" },
>         { NULL, 0, 0, NULL, 0, NULL, NULL }
>     };
>     struct poptOption transactOptionsTable[] = {
>         { "keyfile", '\0', POPT_ARG_STRING, &PathnameOfKeyFile, 0,
>             "transact offer key file (flat_O.kf)", "key-file" },
>         { "offerfile", '\0', POPT_ARG_STRING, &PathnameOfOfferFile,
0,
>             "offer template file (osl.ofr)", "offer-file" },
>         { "storeid", '\0', POPT_ARG_INT, &txStoreId, 0,
>             "store id", "store-id" },
>         { "rcfile", '\0', POPT_ARG_STRING, &rcfile, 0,
>             "default command line options (in popt format)",
"rcfile" },
>         { "txhost", '\0', POPT_ARG_STRING, &txHost, 0,
>             "transact host", "transact-host" },
>         { "txsslport", '\0', POPT_ARG_INT, &txSslPort, 0,
>             "transact server ssl port ", "transact ssl port" },
>         { "cnhost", '\0', POPT_ARG_STRING, &contentHost, 0,
>             "content host", "content-host" },
>         { "cnpath", '\0', POPT_ARG_STRING, &contentPath, 0,
>             "content url path", "content-path" },
>         { NULL, 0, 0, NULL, 0, NULL, NULL }
>     };
>
>     struct poptOption databaseOptionsTable[] = {
>         { "dbpassword", '\0', POPT_ARG_STRING, &dbPassword, 0,
>             "Database password", "DB password" },
>         { "dbusername", '\0', POPT_ARG_STRING, &dbUserName, 0,
>             "Database user name", "DB UserName" },
>         { NULL, 0, 0, NULL, 0, NULL, NULL }
>     };
>
>     struct poptOption optionsTable[] = {
> 	{ NULL, '\0', POPT_ARG_INCLUDE_TABLE,  transactOptionsTable, 0,
>             "Transact Options (not all will apply)", NULL },
> 	{ NULL, '\0', POPT_ARG_INCLUDE_TABLE,  databaseOptionsTable, 0,
>             "Transact Database Names", NULL },
> 	{ NULL, '\0', POPT_ARG_INCLUDE_TABLE,  userOptionsTable, 0,
>             "User Fields", NULL },
>         POPT_AUTOHELP
>         { NULL, 0, 0, NULL, 0, NULL, NULL }
>     };
>
>     optCon = poptGetContext("createuser", argc, argv, optionsTable,
0);
>     poptReadConfigFile(optCon, rcfile );
>
>     /* although there are no options to be parsed, check for --help
*/
>     poptGetNextOpt(optCon);
>
>     poptFreeContext(optCon);
>
>     printf( "dbusername %s\tdbpassword %s\n"
>             "txhost %s\ttxsslport %d\ttxstoreid %d\tpathofkeyfile
%s\n"
> 	    "username %s\tpassword %s\tfirstname %s\tlastname %s\n"
> 	    "addr1 %s\taddr2 %s\tcity %s\tstate %s\tpostal %s\n"
> 	    "country %s\temail %s\tdayphone %s\tfax %s\n",
>         dbUserName, dbPassword,
>         txHost, txSslPort, txStoreId, PathnameOfKeyFile,
>         username, password, firstname, lastname,
>         addr1,addr2, city, state, postal,
>         country, email, dayphone, fax);
>     return 0;
> }
diff -rN popt-1.4/testit.sh popt.NEW/testit.sh
2a3,4
> testdir=test-data
>
16a19,36
> run2() {
>     prog=$1; shift
>     name=$1; shift
>     number=$1; shift
>
>     answer=`cat $testdir/$number.answer`
>     params=`cat $testdir/$number.param`
>     #echo "--->$params<---";
>     echo Running test $name.
>
>     result=`./$prog $params`
>     if [ "$answer" != "$result" ]; then
> 	echo "Test --->$params<--- failed with:"
> 	echo "---}$result{---"
> 	#exit 2
>     fi
> }
>
46a67,76
>
>
> run2 test2 "test2 - 29 - long/short param mix"				29
> run2 test2 "test2 - 30 - same data as 29 but with long opts"		30
> run2 test2 "test2 - 31 - only short opts of 29"				31
> run2 test2 "test2 - 32 - long opt, two alternatives to set"		32
> run2 test2 "test2 - 33 - short opt with =, two alternatives to set"
33
> run2 test2 "test2 - 34 - short opt w/o =, two alternatives to set"
34
> run2 test2 "test2 - 35 - long/short, two alternatives to set mix"	35
> run2 test2 "test2 - 36 - long/short, two alternatives to set mix II"
36
Comment 2 jay 1999-10-21 17:49:59 EDT
ignore the last comment.  this is a uuencode'd gzip of the patch file
of "diff -rN popt-1.4 popt.NEW"


begin 644 diff.gz
M'XL("`B)#S@"`V1I9F8`[5KK<]I($O\,?\4<\=[:*01(/!SB*!7')EEG":9L
M4O=AL^4=)&%4%A(GB<1.*O_[=?>,'J"1G.=5ZFY5"4@]W?WKF7ZH9XSM+A9,
M"R=L':QC36_UVJ_YC;-P/:?%5T1L34;_RA/K>L_2>_4GS`]</XJOIA?G+R^.
M7U\RD\5.%.MU3=/J3\M&Z=-@=7W`]<.F_@@XB7)U>?[FXF24\!DM*QT9GQZ?
MG@)];]]SYU?CV?CL^<7QQ=GH\J!NEUOO^@KK7;^N6SK8_H#E&:\=WPEY[-B,
M;^)@Q6/7XIYWQ^9WDG#C,%#.%F&P8OFE$%/]*F6\J*VO6WTT[FQR.3L>CY.U
M@ZD_VR$]@\4X?GVU0[UZ,3Y^":LBK/H,+?5^E_=[.=[+V<79E-0PLS[4K:'Q
MK7X>=OFPWQP.OLW/NM'ANM%KZD:FZ/SYJ]')#!5)34$Z=#J:CB:GH\G)&0$Q
MT$>QX/$<&"T6C$(\&TV]AT']J*GW.S#CENVLHS:*+!UOW9KF"&L>1DY*H:FV
MIB"238O,1]8KCR>S/0`J\:8$$,DFL"4BR9E(0I`+_J7&Y9X,,/7I%YLJ"49F
M^],OMCW5D4[&&/2X<:@WC<->XI3'!:Z4D/<HXM>>A2NF+80</N_MC\\FOV<"
MTK\'Y2HIW/`1XHQ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2?9`*T<">7C+U^,<M4PQY&\77.OOEQC
M46RX<J+9_C7;8>:VZ.DV.B<B=H=R_R;V6')3)'<4.=ZT]9<=>=8NPU332`Z=
M>!/ZXGSL4\G9JANWHN7VZ2J1Z@;O-I,?B]IN:*9'O1AO^(/R8;.+OQ0*-[ZQ
M?Y"^@_"@T]S3CUBT=!>Q)-*958%(O?4668Z((WOS+XO';$_BM_<$OSS/_RN!
MPS/GJ(25!A/.!XZU#%A#T[2G>T+J"=PWDK6BT8N-[^/Y#9T![Z'5N7-<V--`
M4V?^U6KOX229U)+H=Q?L#];8$^8UV#],>!`B#?;G$=8&'T-66$&'TSNF@.L@
MB&QX'\3+QXV,%X8^24T?T6(<>>#<NC$S)/3")0?CCVH'?'#8/!RDAUSH'?GK
M\(;XTI@QA`\\4&Y'2\QT<::_<F\;-;B,88E8MP,?D?AM8\SQ,!H4S3<Q&2P.
MJ"&*(E!"OQ91JM#A(_"].R:0D1]/)(PA07?U,CE#6HP2D(2PNX6BBQF&!^Y4
M8R,G1F2C3$,7C4]`A<EFA:9NMTQ1;UM1.ZC6TRO3T]]R0JD*X9=NOTS-X//5
0L+,ST#2H_P<V;L-9AC(`````
`
end
Comment 3 Jeff Johnson 1999-10-21 18:51:59 EDT
Speak of the Devil :-)

I was just hacking in popt, as constructs like --prefix=/foo don't
work in rpm (which does a poptResetContext to reread arguments that
aren't quite the same anymore ...).

Thanks *very* much for the new test! I should have a fix for you by
early next week.

BTW, large patches are most easily sent as an attachment in a reply
to the notification mail you get from bugzilla.
Comment 4 Jeff Johnson 1999-10-25 16:19:59 EDT
The problem is in poptGetNextOpt(), where the argument longArg
needs to be reset to NULL at the beginning of each "while (!done)"
traversal rather than at the entry to poptGetNextOpt. I've fixed
this in popt CVS.

Note You need to log in before you can comment on or make changes to this bug.