Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ethmngr
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HAL
ethmngr
Commits
7425531c
Commit
7425531c
authored
3 months ago
by
Husaam Mehdi
Browse files
Options
Downloads
Patches
Plain Diff
ethmngr: use bbfdm object instead of bbfdm.ethmngr in test
parent
171cf63d
Branches
Branches containing commit
No related tags found
1 merge request
!32
ethmngr: use bbfdm object instead of bbfdm.ethmngr in test
Pipeline
#204351
passed
2 months ago
Stage: static_code_analysis
Stage: functional_test
Changes
1
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/validate_ethmngr.py
+5
-5
5 additions, 5 deletions
test/validate_ethmngr.py
with
5 additions
and
5 deletions
test/validate_ethmngr.py
+
5
−
5
View file @
7425531c
...
@@ -23,25 +23,25 @@ if sock.exists():
...
@@ -23,25 +23,25 @@ if sock.exists():
else
:
else
:
assert
ubus
.
connect
()
assert
ubus
.
connect
()
out
=
ubus
.
call
(
'
bbfdm
.ethmngr
'
,
'
add
'
,
{
"
path
"
:
"
Device.Ethernet.RMONStats.
"
})
out
=
ubus
.
call
(
'
bbfdm
'
,
'
add
'
,
{
"
path
"
:
"
Device.Ethernet.RMONStats.
"
})
inst
=
out
[
0
][
"
results
"
][
0
][
"
data
"
]
inst
=
out
[
0
][
"
results
"
][
0
][
"
data
"
]
assert
int
(
inst
)
>
0
,
"
Fail to add RMONStats instance
"
assert
int
(
inst
)
>
0
,
"
Fail to add RMONStats instance
"
out
=
ubus
.
call
(
'
bbfdm
.ethmngr
'
,
'
set
'
,
{
"
path
"
:
"
Device.Ethernet.RMONStats.
"
+
inst
+
"
.Enable
"
,
"
value
"
:
"
1
"
})
out
=
ubus
.
call
(
'
bbfdm
'
,
'
set
'
,
{
"
path
"
:
"
Device.Ethernet.RMONStats.
"
+
inst
+
"
.Enable
"
,
"
value
"
:
"
1
"
})
assert
int
(
out
[
0
][
"
results
"
][
0
][
"
data
"
])
==
1
,
"
Failed to enable RMONStats instance
"
assert
int
(
out
[
0
][
"
results
"
][
0
][
"
data
"
])
==
1
,
"
Failed to enable RMONStats instance
"
out
=
ubus
.
call
(
'
bbfdm
.ethmngr
'
,
'
set
'
,
{
"
path
"
:
"
Device.Ethernet.RMONStats.
"
+
inst
+
"
.Interface
"
,
"
value
"
:
"
Device.Ethernet.Interface.5
"
})
out
=
ubus
.
call
(
'
bbfdm
'
,
'
set
'
,
{
"
path
"
:
"
Device.Ethernet.RMONStats.
"
+
inst
+
"
.Interface
"
,
"
value
"
:
"
Device.Ethernet.Interface.5
"
})
assert
int
(
out
[
0
][
"
results
"
][
0
][
"
data
"
])
==
1
,
"
Failed to set interface of RMONStats instance
"
assert
int
(
out
[
0
][
"
results
"
][
0
][
"
data
"
])
==
1
,
"
Failed to set interface of RMONStats instance
"
# test rmonstats
# test rmonstats
for
i
in
rmon_stats
:
for
i
in
rmon_stats
:
out
=
ubus
.
call
(
'
bbfdm
.ethmngr
'
,
'
get
'
,
{
"
path
"
:
"
Device.Ethernet.RMONStats.
"
+
inst
+
"
.
"
+
i
})
out
=
ubus
.
call
(
'
bbfdm
'
,
'
get
'
,
{
"
path
"
:
"
Device.Ethernet.RMONStats.
"
+
inst
+
"
.
"
+
i
})
print
(
out
)
print
(
out
)
assert
str
(
out
[
0
][
i
])
!=
""
,
"
Fail at RMONSTAT
"
+
i
assert
str
(
out
[
0
][
i
])
!=
""
,
"
Fail at RMONSTAT
"
+
i
# test ifstats
# test ifstats
for
i
in
if_stats
:
for
i
in
if_stats
:
out
=
ubus
.
call
(
'
bbfdm
.ethmngr
'
,
'
get
'
,
{
"
path
"
:
"
Device.Ethernet.Interface.5.Stats.
"
+
i
})
out
=
ubus
.
call
(
'
bbfdm
'
,
'
get
'
,
{
"
path
"
:
"
Device.Ethernet.Interface.5.Stats.
"
+
i
})
print
(
out
)
print
(
out
)
assert
str
(
out
[
0
][
i
])
!=
""
,
"
Fail at IFSTAT
"
+
i
assert
str
(
out
[
0
][
i
])
!=
""
,
"
Fail at IFSTAT
"
+
i
...
...
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