Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verlässliche Systemsoftware
projects
osv
Commits
c30f2cb0
Commit
c30f2cb0
authored
12 years ago
by
Dor Laor
Browse files
Options
Downloads
Patches
Plain Diff
Move the pci device prints out to a separate file and
reduce the verbosity
parent
9661e04e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
loader.cc
+0
-6
0 additions, 6 deletions
loader.cc
tests/tst-devices.hh
+24
-0
24 additions, 0 deletions
tests/tst-devices.hh
tests/tst-hub.cc
+3
-0
3 additions, 0 deletions
tests/tst-hub.cc
with
27 additions
and
6 deletions
loader.cc
+
0
−
6
View file @
c30f2cb0
...
...
@@ -132,16 +132,10 @@ void* do_main_thread(void *_args)
//Tests malloc and free using threads.
unit_tests
::
tests
::
instance
().
execute_tests
();
//test_alloc();
//test_threads();
// Enumerate PCI devices
pci
::
pci_devices_print
();
pci
::
pci_device_enumeration
();
// List all devices
hw
::
device_manager
::
instance
()
->
list_devices
();
// Initialize all drivers
hw
::
driver_manager
*
drvman
=
hw
::
driver_manager
::
instance
();
drvman
->
register_driver
(
new
virtio
::
virtio_blk
(
0
));
...
...
This diff is collapsed.
Click to expand it.
tests/tst-devices.hh
0 → 100644
+
24
−
0
View file @
c30f2cb0
#ifndef __TST_DEVICES__
#define __TST_DEVICES__
#include
"tst-hub.hh"
#include
"drivers/pci.hh"
#include
"debug.hh"
class
test_devices
:
public
unit_tests
::
vtest
{
public:
void
run
()
{
// Comment it out to reduce output
//pci::pci_devices_print();
// List all devices
hw
::
device_manager
::
instance
()
->
list_devices
();
debug
(
"Devices test succeeded"
);
}
};
#endif
This diff is collapsed.
Click to expand it.
tests/tst-hub.cc
+
3
−
0
View file @
c30f2cb0
...
...
@@ -2,6 +2,7 @@
#include
"tst-threads.hh"
#include
"tst-malloc.hh"
#include
"tst-timer.hh"
#include
"tst-devices.hh"
using
namespace
unit_tests
;
...
...
@@ -9,10 +10,12 @@ void tests::execute_tests() {
test_threads
threads
;
test_malloc
malloc
;
test_timer
timer
;
test_devices
dev
;
instance
().
register_test
(
&
threads
);
instance
().
register_test
(
&
malloc
);
instance
().
register_test
(
&
timer
);
instance
().
register_test
(
&
dev
);
instance
().
run
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment