Skip to contentSkip to conversation

tests/kms_force_connector: ensure igt_exit is called at exit

PATCH In review Thomas Wood 3 participants 6 messages Oct 9, 2014 – Oct 10, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tests/kms_force_connector: ensure igt_exit is called at exit

Since commit 5782eca (lib/igt_core.c: disable lowmemorykiller during tests), igt_exit needs to be called before the test exits.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84771

---
 tests/kms_force_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_force_connector.c +1 -1
index 5b19794..96881c7 100644
@@ -116,5 +116,5 @@ main (int argc, char **argv)
 
 	drmModeFreeConnector(connector);
 
-	igt_success();
+	igt_exit();
 }
Signature · 1 line
2.1.0
#1 lore raw

PATCH 2/2 tests/kms_force_connect: skip if a VGA connector is not available

---
 tests/kms_force_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_force_connector.c +1 -1
index 96881c7..361bf84 100644
@@ -54,7 +54,7 @@ main (int argc, char **argv)
 		connector = NULL;
 	}
 
-	igt_assert(connector);
+	igt_require(connector);
 
 	/* force the connector on and check the reported values */
 	kmstest_force_connector(drm_fd, connector, FORCE_CONNECTOR_ON);
Signature · 1 line
2.1.0
#2 lore raw

Re: [PATCH i-g-t 2/2] tests/kms_force_connect: skip if a VGA connector is not available

Quoted 10 lines · Thomas Wood
---
 tests/kms_force_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_force_connector.c +0 -0
index 96881c7..361bf84 100644

tests/kms_force_connector.c main (int argc, char **argv) · line 57

Quoted 5 lines
tests/kms_force_connector.c +1 -1
@@ -54,7 +54,7 @@ main (int argc, char **argv)
 		connector = NULL;
 	}
 
-	igt_assert(connector);
+	igt_require(connector);

If you rename this vga_connector, the error message will be immediately understandable.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#3 lore raw
In reply to Thomas Wood
Quoted 8 lines

-----Original Message-----
From: Thomas Wood [mailto:[email protected]]
Sent: Thursday, October 09, 2014 4:51 PM
To: [email protected]
Cc: Gore, Tim
Subject: [PATCH i-g-t 1/2] tests/kms_force_connector: ensure igt_exit is called at exit

Quoted 6 lines

Since commit 5782eca (lib/igt_core.c: disable lowmemorykiller during tests), igt_exit needs to be called before the test exits.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84771

Hi Thomas, did you see Paulo's suggestion about replacing igt_assert(connector) with igt_require(connector). Does this make sense. I'm not sure if any systems truly have no vga "connector", but certainly on my harris beach (ultrabook) there Is no externally accessible vga.
Or perhaps you would prefer that to be a separate commit.

Tim

Quoted 17 lines
---
 tests/kms_force_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_force_connector.c +1 -2
index 5b19794..96881c7 100644
@@ -116,5 +116,5 @@ main (int argc, char **argv)
 
 	drmModeFreeConnector(connector);
 
-	igt_success();
+	igt_exit();
 }
--

2.1.0

#4 lore raw
Quoted 15 lines · Tim
Quoted 8 lines

-----Original Message-----
From: Thomas Wood [mailto:[email protected]]
Sent: Thursday, October 09, 2014 4:51 PM
To: [email protected]
Cc: Gore, Tim
Subject: [PATCH i-g-t 1/2] tests/kms_force_connector: ensure igt_exit is called at exit

Quoted 6 lines

Since commit 5782eca (lib/igt_core.c: disable lowmemorykiller during tests), igt_exit needs to be called before the test exits.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84771

Quoted 5 lines

Hi Thomas, did you see Paulo's suggestion about replacing igt_assert(connector) with igt_require(connector). Does this make sense. I'm not sure if any systems truly have no vga "connector", but certainly on my harris beach (ultrabook) there Is no externally accessible vga.
Or perhaps you would prefer that to be a separate commit.

Yes, it's addressed in patch 2 of this series.

Quoted 24 lines

Tim

Quoted 17 lines
---
 tests/kms_force_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_force_connector.c +1 -2
index 5b19794..96881c7 100644
@@ -116,5 +116,5 @@ main (int argc, char **argv)
 
      drmModeFreeConnector(connector);
 
-     igt_success();
+     igt_exit();
 }
--

2.1.0

#5 lore raw
Quoted 26 lines

-----Original Message-----
From: Thomas Wood [mailto:[email protected]]
Sent: Thursday, October 09, 2014 5:10 PM
To: Gore, Tim
Cc: [email protected]
Subject: Re: [PATCH i-g-t 1/2] tests/kms_force_connector: ensure igt_exit is called at exit

Quoted 15 lines · Tim
Quoted 14 lines

-----Original Message-----
From: Thomas Wood [mailto:[email protected]]
Sent: Thursday, October 09, 2014 4:51 PM
To: [email protected]
Cc: Gore, Tim
Subject: [PATCH i-g-t 1/2] tests/kms_force_connector: ensure igt_exit is called at exit

Since commit 5782eca (lib/igt_core.c: disable lowmemorykiller during tests), igt_exit needs to be called before the test exits.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84771

Quoted 9 lines
Quoted 4 lines

Hi Thomas, did you see Paulo's suggestion about replacing igt_assert(connector) with igt_require(connector). Does this make sense. I'm not sure if any systems truly have no vga "connector", but certainly on my harris beach (ultrabook) there Is no externally accessible

vga.

Quoted 1 line

Or perhaps you would prefer that to be a separate commit.

Yes, it's addressed in patch 2 of this series.

OK, this patch looks fine to me

Quoted 24 lines
Quoted 24 lines

Tim

Quoted 17 lines
---
 tests/kms_force_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/tests/kms_force_connector.c index 5b19794..96881c7 100644

tests/kms_force_connector.c +1 -2
@@ -116,5 +116,5 @@ main (int argc, char **argv)
 
      drmModeFreeConnector(connector);
 
-     igt_success();
+     igt_exit();
 }
--

2.1.0