Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
igt-gpu-tools
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
52
Issues
52
List
Boards
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
drm
igt-gpu-tools
Commits
7a805c2f
Commit
7a805c2f
authored
Mar 13, 2017
by
Chris Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Always expose IGT subtests for known kernel selftests"
This reverts commit
7ab5c979
.
parent
bb97a054
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
84 deletions
+18
-84
lib/igt_kmod.c
lib/igt_kmod.c
+14
-38
lib/igt_kmod.h
lib/igt_kmod.h
+1
-7
tests/drm_mm.c
tests/drm_mm.c
+1
-16
tests/drv_selftest.c
tests/drv_selftest.c
+2
-23
No files found.
lib/igt_kmod.c
View file @
7a805c2f
...
...
@@ -493,54 +493,30 @@ void igt_kselftest_fini(struct igt_kselftest *tst)
kmod_module_unref
(
tst
->
kmod
);
}
static
void
mocklist_mark_entry
(
struct
igt_kselftest_mockentry
*
mocklist
,
const
char
*
name
)
{
struct
igt_kselftest_mockentry
*
me
;
for
(
me
=
mocklist
;
me
->
name
!=
NULL
;
++
me
)
{
if
(
!
strcmp
(
me
->
name
,
name
))
{
me
->
do_mock
=
false
;
return
;
}
}
}
void
igt_kselftests
(
const
char
*
module_name
,
const
char
*
options
,
const
char
*
result
,
const
char
*
filter
,
struct
igt_kselftest_mockentry
*
mocklist
)
const
char
*
filter
)
{
struct
igt_kselftest
tst
;
IGT_LIST
(
tests
);
struct
igt_kselftest_list
*
tl
,
*
tn
;
struct
igt_kselftest_mockentry
*
me
;
i
f
(
igt_kselftest_init
(
&
tst
,
module_name
)
==
0
)
{
igt_fixture
igt_require
(
igt_kselftest_begin
(
&
tst
)
==
0
);
i
gt_require
(
igt_kselftest_init
(
&
tst
,
module_name
)
==
0
);
igt_fixture
igt_require
(
igt_kselftest_begin
(
&
tst
)
==
0
);
igt_kselftest_get_tests
(
tst
.
kmod
,
filter
,
&
tests
);
igt_list_for_each_safe
(
tl
,
tn
,
&
tests
,
link
)
{
igt_subtest_f
(
"%s"
,
tl
->
name
)
igt_kselftest_execute
(
&
tst
,
tl
,
options
,
result
);
mocklist_mark_entry
(
mocklist
,
tl
->
name
);
free
(
tl
);
}
igt_fixture
{
igt_kselftest_end
(
&
tst
);
igt_require
(
!
igt_list_empty
(
&
tests
));
}
igt_kselftest_fini
(
&
tst
);
igt_kselftest_get_tests
(
tst
.
kmod
,
filter
,
&
tests
);
igt_list_for_each_safe
(
tl
,
tn
,
&
tests
,
link
)
{
igt_subtest_f
(
"%s"
,
tl
->
name
)
igt_kselftest_execute
(
&
tst
,
tl
,
options
,
result
);
free
(
tl
);
}
/* Expose subtests for anything the above didn't already generate. */
for
(
me
=
mocklist
;
me
->
name
!=
NULL
;
++
me
)
{
if
(
me
->
do_mock
)
igt_subtest
(
me
->
name
)
igt_skip
(
"Kernel selftest not present"
);
igt_fixture
{
igt_kselftest_end
(
&
tst
);
igt_require
(
!
igt_list_empty
(
&
tests
));
}
igt_kselftest_fini
(
&
tst
);
}
lib/igt_kmod.h
View file @
7a805c2f
...
...
@@ -35,16 +35,10 @@ int igt_kmod_unload(const char *mod_name, unsigned int flags);
int
igt_i915_driver_load
(
const
char
*
opts
);
int
igt_i915_driver_unload
(
void
);
struct
igt_kselftest_mockentry
{
const
char
*
name
;
bool
do_mock
;
};
void
igt_kselftests
(
const
char
*
module_name
,
const
char
*
module_options
,
const
char
*
result_option
,
const
char
*
filter
,
struct
igt_kselftest_mockentry
*
mocklist
);
const
char
*
filter
);
struct
igt_kselftest
{
struct
kmod_module
*
kmod
;
...
...
tests/drm_mm.c
View file @
7a805c2f
...
...
@@ -28,20 +28,5 @@ IGT_TEST_DESCRIPTION("Basic sanity check of DRM's range manager (struct drm_mm)"
igt_main
{
/*
* Set of subtest names that are always exposed by IGT,
* regardless of the running kernel's capabilities. Selftests
* that the kernel has but are not on these lists are also
* exposed. This is a known intentional violation of the
* general rule that subtest enumeration must not change
* depending on the runtime environment.
*/
struct
igt_kselftest_mockentry
drm_mm_testlist
[]
=
{
#define selftest(n, x) { .name = #n, .do_mock = true },
#include "drm_mm_selftests.h"
#undef selftest
{
NULL
,
false
}
};
igt_kselftests
(
"test-drm_mm"
,
NULL
,
NULL
,
NULL
,
drm_mm_testlist
);
igt_kselftests
(
"test-drm_mm"
,
NULL
,
NULL
,
NULL
);
}
tests/drv_selftest.c
View file @
7a805c2f
...
...
@@ -28,27 +28,6 @@ IGT_TEST_DESCRIPTION("Basic unit tests for i915.ko");
igt_main
{
/*
* Set of subtest names that are always exposed by IGT,
* regardless of the running kernel's capabilities. Selftests
* that the kernel has but are not on these lists are also
* exposed. This is a known intentional violation of the
* general rule that subtest enumeration must not change
* depending on the runtime environment.
*/
struct
igt_kselftest_mockentry
i915_mock_testlist
[]
=
{
#define selftest(n, x) { .name = "mock_" #n, .do_mock = true },
#include "i915_mock_selftests.h"
#undef selftest
{
NULL
,
false
}
};
struct
igt_kselftest_mockentry
i915_live_testlist
[]
=
{
#define selftest(n, x) { .name = "live_" #n, .do_mock = true },
#include "i915_live_selftests.h"
#undef selftest
{
NULL
,
false
}
};
igt_kselftests
(
"i915"
,
"mock_selftests=-1"
,
NULL
,
"mock"
,
i915_mock_testlist
);
igt_kselftests
(
"i915"
,
"live_selftests=-1"
,
"live_selftests"
,
"live"
,
i915_live_testlist
);
igt_kselftests
(
"i915"
,
"mock_selftests=-1"
,
NULL
,
"mock"
);
igt_kselftests
(
"i915"
,
"live_selftests=-1"
,
"live_selftests"
,
"live"
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment