Skip to contentSkip to conversation

lib: Make sure we can also use the short form of the subtest options

PATCH In review Damien Lespiau 3 participants 3 messages Mar 21, 2013 – Mar 22, 2013 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib: Make sure we can also use the short form of the subtest options

From: Damien Lespiau <[email protected]>

---
 lib/drmtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/drmtest.c +1 -1
index 641028c..2d4fc89 100644
@@ -530,7 +530,7 @@ void drmtest_subtest_init(int argc, char **argv)
 
 	/* supress getopt errors about unknown options */
 	opterr = 0;
-	while((c = getopt_long(argc, argv, "",
+	while((c = getopt_long(argc, argv, "lr:",
 			       long_options, &option_index)) != -1) {
 		switch(c) {
 		case 'l':
Signature · 1 line
1.7.11.7
#1 lore raw
Quoted 3 lines · Damien Lespiau

From: Damien Lespiau <[email protected]>

My original thinking behind only allowing the long option name is to avoid collisions with cmdline options for the test executable itself. E.g. when we'd teach testdisplay a few different default runs, but you could still dig into all the fancy modes through cmdline options. Similar for gem_stress.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#2 lore raw
Quoted 5 lines · Daniel Vetter

My original thinking behind only allowing the long option name is to avoid collisions with cmdline options for the test executable itself. E.g. when we'd teach testdisplay a few different default runs, but you could still dig into all the fancy modes through cmdline options. Similar for gem_stress.

Oh, yes, makes sense and it's a good idea, never mind then.

Signature · 1 line
Damien