diff mbox

[i-g-t] lib: Make sure we can also use the short form of the subtest options

Message ID 1363883038-8698-1-git-send-email-damien.lespiau@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Damien Lespiau March 21, 2013, 4:23 p.m. UTC
From: Damien Lespiau <damien.lespiau@intel.com>

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 lib/drmtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Vetter March 21, 2013, 7:14 p.m. UTC | #1
On Thu, Mar 21, 2013 at 5:23 PM, Damien Lespiau
<damien.lespiau@gmail.com> wrote:
> From: Damien Lespiau <damien.lespiau@intel.com>
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

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
Lespiau, Damien March 22, 2013, 10:25 a.m. UTC | #2
On Thu, Mar 21, 2013 at 08:14:39PM +0100, Daniel Vetter wrote:
> 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.
diff mbox

Patch

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 641028c..2d4fc89 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -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':