Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
c200dd96
Commit
c200dd96
authored
Sep 09, 2020
by
Claes
Committed by
Esteban Blanc
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Project pwrtest01 qcom two nodes test
parent
f63815d8
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1291 additions
and
17 deletions
+1291
-17
project/pwrtest01/build_from_git.sh
project/pwrtest01/build_from_git.sh
+1
-1
project/pwrtest01/src/appl/makefile
project/pwrtest01/src/appl/makefile
+10
-0
project/pwrtest01/src/appl/ra_nethtest.cpp
project/pwrtest01/src/appl/ra_nethtest.cpp
+5
-6
project/pwrtest01/src/appl/ra_qcom2test.cpp
project/pwrtest01/src/appl/ra_qcom2test.cpp
+319
-0
project/pwrtest01/src/appl/ra_qcom2test.h
project/pwrtest01/src/appl/ra_qcom2test.h
+21
-0
project/pwrtest01/src/appl/ra_testall_a.sh
project/pwrtest01/src/appl/ra_testall_a.sh
+11
-1
project/pwrtest01/src/appl/ra_testall_b.sh
project/pwrtest01/src/appl/ra_testall_b.sh
+24
-0
project/pwrtest01/src/appl/ra_testall_c.sh
project/pwrtest01/src/appl/ra_testall_c.sh
+8
-0
project/pwrtest01/src/db/cvolpwrtest01.wb_load
project/pwrtest01/src/db/cvolpwrtest01.wb_load
+1
-1
project/pwrtest01/src/db/directory.wb_load
project/pwrtest01/src/db/directory.wb_load
+21
-6
project/pwrtest01/src/db/pwrp_cnf_bootlist.dat
project/pwrtest01/src/db/pwrp_cnf_bootlist.dat
+1
-1
project/pwrtest01/src/db/pwrp_cnf_distribute.dat
project/pwrtest01/src/db/pwrp_cnf_distribute.dat
+3
-0
project/pwrtest01/src/db/pwrp_cnf_volumelist.dat
project/pwrtest01/src/db/pwrp_cnf_volumelist.dat
+1
-1
project/pwrtest01/src/db/wb_history.log
project/pwrtest01/src/db/wb_history.log
+865
-0
No files found.
project/pwrtest01/build_from_git.sh
View file @
c200dd96
...
@@ -96,7 +96,7 @@ if [ ! -e $pwra_db ]; then
...
@@ -96,7 +96,7 @@ if [ ! -e $pwra_db ]; then
cp
$pwre_croot
/src/tools/pkg/deb/adm/
*
$pwra_db
/
cp
$pwre_croot
/src/tools/pkg/deb/adm/
*
$pwra_db
/
fi
fi
if
[
"
`
eval grep
CVolPwrtest01
$pwra_db
/pwr_volumelist.dat
`
"
==
""
]
;
then
if
[
"
`
eval grep
CVolPwrtest01
$pwra_db
/pwr_volumelist.dat
`
"
==
""
]
;
then
echo
"CVolPwrtest01 0.0.2
54
.254 pwrtest01"
>>
$pwra_db
/pwr_volumelist.dat
echo
"CVolPwrtest01 0.0.2
40
.254 pwrtest01"
>>
$pwra_db
/pwr_volumelist.dat
fi
fi
if
[
"
`
eval grep
VolPwrTest01a
$pwra_db
/pwr_volumelist.dat
`
"
==
""
]
;
then
if
[
"
`
eval grep
VolPwrTest01a
$pwra_db
/pwr_volumelist.dat
`
"
==
""
]
;
then
echo
"VolPwrTest01a 0.254.254.201 pwrtest01"
>>
$pwra_db
/pwr_volumelist.dat
echo
"VolPwrTest01a 0.254.254.201 pwrtest01"
>>
$pwra_db
/pwr_volumelist.dat
...
...
project/pwrtest01/src/appl/makefile
View file @
c200dd96
...
@@ -4,7 +4,9 @@ include $(pwr_exe)/pwrp_rules.mk
...
@@ -4,7 +4,9 @@ include $(pwr_exe)/pwrp_rules.mk
demo_modules
=
$(pwrp_exe)
/ra_status
\
demo_modules
=
$(pwrp_exe)
/ra_status
\
$(pwrp_exe)
/ra_nethtest
\
$(pwrp_exe)
/ra_nethtest
\
$(pwrp_exe)
/ra_qcom2test
\
$(pwrp_exe)
/ra_testall_a.sh
\
$(pwrp_exe)
/ra_testall_a.sh
\
$(pwrp_exe)
/ra_testall_b.sh
\
$(pwrp_exe)
/ra_plctest
\
$(pwrp_exe)
/ra_plctest
\
$(pwrp_exe)
/ra_gdhtest
\
$(pwrp_exe)
/ra_gdhtest
\
$(pwrp_exe)
/ra_timetest
\
$(pwrp_exe)
/ra_timetest
\
...
@@ -34,10 +36,18 @@ $(pwrp_exe)/ra_nethtest : $(pwrp_appl)/ra_nethtest.cpp $(pwrp_appl)/ra_nethtest.
...
@@ -34,10 +36,18 @@ $(pwrp_exe)/ra_nethtest : $(pwrp_appl)/ra_nethtest.cpp $(pwrp_appl)/ra_nethtest.
@
echo
"Building ra_nethtest"
@
echo
"Building ra_nethtest"
@
g++
-g
-o
$(target)
$(source)
$(pwr_obj)
/pwr_msg_co.o
$(pwr_obj)
/pwr_msg_rt.o
-I
$(pwrp_inc)
-I
$(pwr_inc)
-L
$(pwr_lib)
-lpwr_rt
-lpwr_co
-lpwr_msg_dummy
-lrpcsvc
-lpthread
-lm
-lrt
-Wall
@
g++
-g
-o
$(target)
$(source)
$(pwr_obj)
/pwr_msg_co.o
$(pwr_obj)
/pwr_msg_rt.o
-I
$(pwrp_inc)
-I
$(pwr_inc)
-L
$(pwr_lib)
-lpwr_rt
-lpwr_co
-lpwr_msg_dummy
-lrpcsvc
-lpthread
-lm
-lrt
-Wall
$(pwrp_exe)/ra_qcom2test
:
$(pwrp_appl)/ra_qcom2test.cpp $(pwrp_appl)/ra_qcom2test.h
@
echo
"Building ra_qcom2test"
@
g++
-g
-o
$(target)
$(source)
$(pwr_obj)
/pwr_msg_co.o
$(pwr_obj)
/pwr_msg_rt.o
-I
$(pwrp_inc)
-I
$(pwr_inc)
-L
$(pwr_lib)
-lpwr_rt
-lpwr_co
-lpwr_msg_dummy
-lrpcsvc
-lpthread
-lm
-lrt
-Wall
$(pwrp_exe)/ra_testall_a.sh
:
$(pwrp_appl)/ra_testall_a.sh
$(pwrp_exe)/ra_testall_a.sh
:
$(pwrp_appl)/ra_testall_a.sh
@
echo
"Building ra_testall_a"
@
echo
"Building ra_testall_a"
@
cp
-p
$(source)
$(target)
@
cp
-p
$(source)
$(target)
$(pwrp_exe)/ra_testall_b.sh
:
$(pwrp_appl)/ra_testall_b.sh
@
echo
"Building ra_testall_b"
@
cp
-p
$(source)
$(target)
$(pwrp_exe)/ra_plctest
:
$(pwrp_appl)/ra_plctest.cpp
$(pwrp_exe)/ra_plctest
:
$(pwrp_appl)/ra_plctest.cpp
@
echo
"Building ra_plctest"
@
echo
"Building ra_plctest"
@
g++
-g
-o
$(target)
$(source)
$(pwr_obj)
/pwr_msg_rt.o
-I
$(pwr_inc)
-L
$(pwr_lib)
-lpwr_rt
-lpwr_co
-lpwr_msg_dummy
-lrpcsvc
-lpthread
-lm
-lrt
-Wall
@
g++
-g
-o
$(target)
$(source)
$(pwr_obj)
/pwr_msg_rt.o
-I
$(pwr_inc)
-L
$(pwr_lib)
-lpwr_rt
-lpwr_co
-lpwr_msg_dummy
-lrpcsvc
-lpthread
-lm
-lrt
-Wall
...
...
project/pwrtest01/src/appl/ra_nethtest.cpp
View file @
c200dd96
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
Test neth functions.
Test neth functions.
*/
*/
#include <stdio.h>
#include <stdio.h>
#include <unistd.h>
#include <unistd.h>
#include "pwr.h"
#include "pwr.h"
...
@@ -27,22 +26,22 @@ typedef struct {
...
@@ -27,22 +26,22 @@ typedef struct {
void
ra_nethtest
::
ObjidToName
(
void
)
void
ra_nethtest
::
ObjidToName
(
void
)
{
{
sObjidToName
d
[]
=
{
sObjidToName
d
[]
=
{
{
"Test01b-Neth"
,
HAS
H__SUCCESS
,
HASH__SUCCESS
,
pwr_cNOid
},
{
"Test01b-Neth"
,
GD
H__SUCCESS
,
HASH__SUCCESS
,
pwr_cNOid
},
{
"Test01b-Neth-"
,
HAS
H__SUCCESS
,
HASH__SUCCESS
,
pwr_cNOid
},
{
"Test01b-Neth-"
,
GD
H__SUCCESS
,
HASH__SUCCESS
,
pwr_cNOid
},
{
"Test01b-Neth-LongName90123456789012345678901"
,
HAS
H__SUCCESS
,
HASH__SUCCESS
,
pwr_cNOid
},
{
"Test01b-Neth-LongName90123456789012345678901"
,
GD
H__SUCCESS
,
HASH__SUCCESS
,
pwr_cNOid
},
{
"Test01b-Neth-TooLongName234567890123456789012"
,
CDH__SEGLEN
,
0
,
pwr_cNOid
}
{
"Test01b-Neth-TooLongName234567890123456789012"
,
CDH__SEGLEN
,
0
,
pwr_cNOid
}
};
};
pwr_tOName
oname
;
pwr_tOName
oname
;
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
d
)
/
sizeof
(
d
[
0
]);
i
++
)
{
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
d
)
/
sizeof
(
d
[
0
]);
i
++
)
{
m_sts
=
gdh_NameToObjid
(
d
[
i
].
name
,
&
d
[
i
].
oid
);
m_sts
=
gdh_NameToObjid
(
d
[
i
].
name
,
&
d
[
i
].
oid
);
if
(
m_sts
!=
d
[
i
].
sts1
)
{
if
(
!
(
m_sts
==
d
[
i
].
sts1
||
m_sts
==
d
[
i
].
sts2
)
)
{
m_log
->
log
(
'E'
,
"ObjidToName, NameToObjid wrong sts"
,
d
[
i
].
name
,
m_sts
);
m_log
->
log
(
'E'
,
"ObjidToName, NameToObjid wrong sts"
,
d
[
i
].
name
,
m_sts
);
return
;
return
;
}
}
else
if
(
ODD
(
m_sts
))
{
else
if
(
ODD
(
m_sts
))
{
m_sts
=
gdh_ObjidToName
(
d
[
i
].
oid
,
oname
,
sizeof
(
oname
),
cdh_mNName
);
m_sts
=
gdh_ObjidToName
(
d
[
i
].
oid
,
oname
,
sizeof
(
oname
),
cdh_mNName
);
if
(
m_sts
!=
d
[
i
].
sts2
)
{
if
(
!
(
m_sts
==
d
[
i
].
sts1
||
m_sts
==
d
[
i
].
sts2
)
)
{
m_log
->
log
(
'E'
,
"ObjidToName, wrong sts"
,
d
[
i
].
name
,
m_sts
);
m_log
->
log
(
'E'
,
"ObjidToName, wrong sts"
,
d
[
i
].
name
,
m_sts
);
return
;
return
;
}
}
...
...
project/pwrtest01/src/appl/ra_qcom2test.cpp
0 → 100644
View file @
c200dd96
/*
Test qcom functions.
*/
#include <stdio.h>
#include <unistd.h>
#include <stddef.h>
#include <math.h>
#include <pthread.h>
#include "pwr_class.h"
#include "co_msg.h"
#include "co_dcli.h"
#include "co_time.h"
#include "co_syi.h"
#include "rt_gdh.h"
#include "ra_qcom2test.h"
#include "rt_qcom_msg.h"
#include "rt_hash_msg.h"
#include "rt_qdb_msg.h"
#include "pwr_baseclasses.h"
#include "pwr_basecomponentclasses.h"
#include "pwr_cvolpwrtest01classes.h"
//static int plog = 1;
typedef
struct
{
char
msg
[
1000
];
qcom_eBtype
btype
;
qcom_eStype
stype
;
pwr_tStatus
sts
;
}
sPut
;
void
ra_qcom2test
::
Put
(
void
)
{
sPut
d
[]
=
{
{
"Some message 1"
,
(
qcom_eBtype
)
2001
,
(
qcom_eStype
)
1
,
QCOM__SUCCESS
},
{
"Some message 2"
,
(
qcom_eBtype
)
32
,
(
qcom_eStype
)
31
,
QCOM__SUCCESS
},
{
"A longer message, A longer message, A longer message, A longer message, A longer message,"
"A longer message, A longer message, A longer message, A longer message, A longer message,"
"A longer message, A longer message, A longer message, A longer message, A longer message,"
"A longer message, A longer message, A longer message, A longer message, A longer message,"
"A longer message, A longer message, A longer message, A longer message, A longer message,"
"A longer message, A longer message, A longer message, A longer message, A longer message,"
"A longer message, A longer message, A longer message, A longer message, A longer message,"
"A longer message, A longer message, A longer message, A longer message, A longer message,"
"A longer message, A longer message, A longer message, A longer message, A longer message,"
"A longer message, A longer message, A longer message, A longer message, A longer message"
,
(
qcom_eBtype
)
2020
,
(
qcom_eStype
)
31
,
QCOM__SUCCESS
}
};
qcom_sQattr
attr
;
qcom_sPut
put
;
qcom_sGet
get
;
qcom_sQid
sqid
=
{
3337
,
m_bvid
};
if
(
m_is_a
)
{
// Send
struct
timespec
t
=
{
0
,
100000000
};
m_log
->
vlog
(
'D'
,
"Put start"
);
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
d
)
/
sizeof
(
d
[
0
]);
i
++
)
{
put
.
reply
=
sqid
;
put
.
type
.
b
=
d
[
i
].
btype
;
put
.
type
.
s
=
d
[
i
].
stype
;
put
.
size
=
strlen
(
d
[
i
].
msg
)
+
1
;
put
.
data
=
d
[
i
].
msg
;
qcom_Put
(
&
m_sts
,
&
sqid
,
&
put
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"Put, qcom_Put"
,
m_sts
);
return
;
}
m_log
->
vlog
(
'D'
,
"Put message %d"
,
i
);
nanosleep
(
&
t
,
0
);
}
m_log
->
log
(
'S'
,
"Put"
,
QCOM__SUCCESS
);
}
else
{
// Receive
attr
.
type
=
qcom_eQtype_private
;
attr
.
quota
=
100
;
qcom_CreateQ
(
&
m_sts
,
&
sqid
,
&
attr
,
"queue3337"
);
if
(
m_sts
==
QCOM__QALLREXIST
)
{
qcom_DeleteQ
(
&
m_sts
,
&
sqid
);
qcom_CreateQ
(
&
m_sts
,
&
sqid
,
&
attr
,
"queue3337"
);
}
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"Put, qcom_CreateQ"
,
m_sts
);
return
;
}
m_log
->
vlog
(
'D'
,
"Put start"
);
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
d
)
/
sizeof
(
d
[
0
]);
i
++
)
{
int
tmo
=
180000
;
get
.
data
=
0
;
qcom_Get
(
&
m_sts
,
&
sqid
,
&
get
,
tmo
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"Put, qcom_Get"
,
m_sts
);
return
;
}
if
(
strcmp
(
d
[
i
].
msg
,
(
char
*
)
get
.
data
)
!=
0
||
get
.
type
.
b
!=
d
[
i
].
btype
||
get
.
type
.
s
!=
d
[
i
].
stype
||
get
.
size
!=
strlen
(
d
[
i
].
msg
)
+
1
)
{
m_log
->
vlog
(
'E'
,
"Put, content differs, %d"
,
i
);
return
;
}
m_log
->
vlog
(
'D'
,
"Put message %d"
,
i
);
qcom_Free
(
&
m_sts
,
get
.
data
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"Put, qcom_Free"
,
m_sts
);
return
;
}
}
m_log
->
log
(
'S'
,
"Put"
,
QCOM__SUCCESS
);
}
// Cyclic send
if
(
m_is_a
)
{
// Send
m_log
->
vlog
(
'D'
,
"Cyclic put start"
);
for
(
unsigned
int
i
=
0
;
i
<
10000
;
i
++
)
{
struct
timespec
t
=
{
0
,
2000000
};
put
.
reply
=
sqid
;
put
.
type
.
b
=
d
[
0
].
btype
;
put
.
type
.
s
=
d
[
0
].
stype
;
put
.
size
=
strlen
(
d
[
0
].
msg
)
+
1
;
put
.
data
=
d
[
0
].
msg
;
qcom_Put
(
&
m_sts
,
&
sqid
,
&
put
);
if
(
EVEN
(
m_sts
))
{
if
(
i
<
100
)
{
m_log
->
log
(
'E'
,
"Cyclic put, qcom_Put"
,
m_sts
);
return
;
}
else
{
if
(
m_sts
!=
QDB__QUOTAEXCEEDED
)
{
m_log
->
log
(
'E'
,
"Put, qcom_Put"
,
m_sts
);
return
;
}
}
}
m_log
->
vlog
(
'D'
,
"Cyclic put %d"
,
i
);
nanosleep
(
&
t
,
0
);
}
m_log
->
log
(
'S'
,
"Cyclic put"
,
QCOM__SUCCESS
);
}
else
{
// Receive
m_log
->
vlog
(
'D'
,
"Cyclic put start"
);
for
(
unsigned
int
i
=
0
;
i
<
10000
;
i
++
)
{
int
tmo
=
2000
;
get
.
data
=
0
;
qcom_Get
(
&
m_sts
,
&
sqid
,
&
get
,
tmo
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"Put, qcom_Get"
,
m_sts
);
return
;
}
if
(
strcmp
((
char
*
)
d
[
0
].
msg
,
(
char
*
)
get
.
data
)
!=
0
||
get
.
type
.
b
!=
d
[
0
].
btype
||
get
.
type
.
s
!=
d
[
0
].
stype
||
get
.
size
!=
strlen
(
d
[
0
].
msg
)
+
1
)
{
m_log
->
vlog
(
'E'
,
"Put, content differs, %d"
,
i
);
return
;
}
m_log
->
vlog
(
'D'
,
"Cyclic put %d"
,
i
);
qcom_Free
(
&
m_sts
,
get
.
data
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"Put, qcom_Free"
,
m_sts
);
return
;
}
}
m_log
->
log
(
'S'
,
"Cyclic put"
,
QCOM__SUCCESS
);
}
// Check quota
if
(
m_is_a
)
{
// Send
m_log
->
vlog
(
'D'
,
"Quota put start"
);
for
(
unsigned
int
i
=
0
;
i
<
110
;
i
++
)
{
struct
timespec
t
=
{
0
,
1000000
};
put
.
reply
=
sqid
;
put
.
type
.
b
=
d
[
0
].
btype
;
put
.
type
.
s
=
d
[
0
].
stype
;
put
.
size
=
strlen
(
d
[
0
].
msg
)
+
1
;
put
.
data
=
d
[
0
].
msg
;
qcom_Put
(
&
m_sts
,
&
sqid
,
&
put
);
if
(
EVEN
(
m_sts
))
{
if
(
i
<
100
)
{
m_log
->
log
(
'E'
,
"Put, qcom_Put"
,
m_sts
);
return
;
}
else
{
if
(
m_sts
!=
QDB__QUOTAEXCEEDED
)
{
m_log
->
log
(
'E'
,
"Put, qcom_Put"
,
m_sts
);
return
;
}
}
}
m_log
->
vlog
(
'D'
,
"Quota put %i"
,
i
);
nanosleep
(
&
t
,
0
);
}
m_log
->
log
(
'S'
,
"Cyclic put"
,
QCOM__SUCCESS
);
}
else
{
// Receive
m_log
->
vlog
(
'D'
,
"Quota put start"
);
for
(
unsigned
int
i
=
0
;
i
<
110
;
i
++
)
{
int
tmo
=
200
;
get
.
data
=
0
;
qcom_Get
(
&
m_sts
,
&
sqid
,
&
get
,
tmo
);
if
(
i
==
0
)
sleep
(
5
);
if
(
EVEN
(
m_sts
))
{
if
(
i
>
100
&&
m_sts
==
QCOM__TMO
)
continue
;
else
{
m_log
->
log
(
'E'
,
"Put, qcom_Get"
,
m_sts
);
return
;
}
}
if
(
strcmp
((
char
*
)
d
[
0
].
msg
,
(
char
*
)
get
.
data
)
!=
0
||
get
.
type
.
b
!=
d
[
0
].
btype
||
get
.
type
.
s
!=
d
[
0
].
stype
||
get
.
size
!=
strlen
(
d
[
0
].
msg
)
+
1
)
{
m_log
->
vlog
(
'E'
,
"Put, content differs, %d"
,
i
);
return
;
}
m_log
->
vlog
(
'D'
,
"Quota put %i"
,
i
);
qcom_Free
(
&
m_sts
,
get
.
data
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"Put, qcom_Free"
,
m_sts
);
return
;
}
}
m_log
->
log
(
'S'
,
"Cyclic put"
,
QCOM__SUCCESS
);
}
if
(
!
m_is_a
)
{
qcom_DeleteQ
(
&
m_sts
,
&
sqid
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"Put, qcom_DeleteQ"
,
m_sts
);
return
;
}
}
m_log
->
log
(
'S'
,
"Put"
,
QCOM__SUCCESS
);
}
// Constructor
ra_qcom2test
::
ra_qcom2test
()
{
pwr_tStatus
sts
;
pwr_tNid
nid
;
pwr_tTime
stime
;
cdh_StringToVolumeId
(
"_V0.254.254.201"
,
&
m_avid
);
cdh_StringToVolumeId
(
"_V0.254.254.202"
,
&
m_bvid
);
sts
=
gdh_Init
(
"ra_qcom2test"
);
if
(
EVEN
(
sts
))
{
m_log
->
log
(
'S'
,
"qcom2 gdh_Init"
,
sts
);
exit
(
0
);
}
sts
=
gdh_GetNodeIndex
(
&
nid
);
if
(
EVEN
(
sts
))
{
m_log
->
log
(
'S'
,
"qcom2 gdh_GetNodeIndex"
,
sts
);
exit
(
0
);
}
if
(
nid
==
m_avid
)
m_is_a
=
1
;
else
m_is_a
=
0
;
if
(
m_is_a
)
m_log
=
new
tst_log
(
&
m_sts
,
"rt-Qcom2a"
,
"$pwrp_log/qcom2a.tlog"
);
else
m_log
=
new
tst_log
(
&
m_sts
,
"rt-Qcom2b"
,
"$pwrp_log/qcom2b.tlog"
);
if
(
EVEN
(
m_sts
))
printf
(
"** Unable to open log file"
);
if
(
m_is_a
)
{
// Wait for pwrtest01b
for
(
int
i
=
0
;
i
<
100
;
i
++
)
{
m_sts
=
gdh_GetObjectInfo
(
"VolPwrtest01b:Nodes-PwrTest01b.SystemTime"
,
&
stime
,
sizeof
(
stime
));
sleep
(
2
);
printf
(
"sts %d
\n
"
,
m_sts
);
if
(
ODD
(
m_sts
))
break
;
}
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'F'
,
"pwrtest01b timeout"
,
m_sts
);
exit
(
0
);
}
}
}
// Destructor
ra_qcom2test
::~
ra_qcom2test
()
{
delete
m_log
;
}
int
main
()
{
ra_qcom2test
qcom
;
qcom
.
Put
();
}
project/pwrtest01/src/appl/ra_qcom2test.h
0 → 100644
View file @
c200dd96
#include "pwr.h"
#include "rt_qcom.h"
#include "co_tst_log.h"
class
ra_qcom2test
{
pwr_tStatus
m_sts
;
tst_log
*
m_log
;
pwr_tVid
m_avid
;
pwr_tVid
m_bvid
;
int
m_is_a
;
public:
ra_qcom2test
();
~
ra_qcom2test
();
tst_log
*
log
()
{
return
m_log
;}
void
Put
();
};
project/pwrtest01/src/appl/ra_testall_a.sh
View file @
c200dd96
...
@@ -6,11 +6,21 @@ exec()
...
@@ -6,11 +6,21 @@ exec()
$1
$1
}
}
# Spawn process
dexec
()
dexec
()
{
{
echo
"Executing
$1
"
echo
"Executing
$1
"
$1
&
$1
&
pid[
$i
]=
$!
i
=
$i
+1
}
}
exec
"ra_nethtest"
let
i
=
0
dexec
"ra_nethtest"
exec
"ra_qcom2test"
# Wait for spawned processes
for
p
in
${
pid
[*]
}
;
do
wait
$p
done
project/pwrtest01/src/appl/ra_testall_b.sh
0 → 100755
View file @
c200dd96
#!/bin/bash
exec
()
{
echo
"Executing
$1
"
$1
}
dexec
()
{
echo
"Executing
$1
"
$1
&
pid[
$i
]=
$!
i
=
$i
+1
}
let
i
=
0
exec
"ra_qcom2test"
# Wait for spawned processes
for
p
in
${
pid
[*]
}
;
do
wait
$p
done
project/pwrtest01/src/appl/ra_testall_c.sh
View file @
c200dd96
...
@@ -10,8 +10,12 @@ dexec()
...
@@ -10,8 +10,12 @@ dexec()
{
{
echo
"Executing
$1
"
echo
"Executing
$1
"
$1
&
$1
&
pid[
$i
]=
$!
i
=
$i
+1
}
}
let
i
=
0
exec
"ra_plctest"
exec
"ra_plctest"
exec
"ra_timetest"
exec
"ra_timetest"
exec
"ra_nettimetest"
exec
"ra_nettimetest"
...
@@ -28,3 +32,7 @@ exec "rt_xtt_cmd @$pwrp_exe/ra_xttscripttest"
...
@@ -28,3 +32,7 @@ exec "rt_xtt_cmd @$pwrp_exe/ra_xttscripttest"
dexec
"ra_qmontest"
dexec
"ra_qmontest"
exec
"ra_qmontest 2"
exec
"ra_qmontest 2"
# Wait for spawned processes
for
p
in
${
pid
[*]
}
;
do
wait
$p
done
project/pwrtest01/src/db/cvolpwrtest01.wb_load
View file @
c200dd96
! Generated by wb_print_wbl 15-MAY-2020 08:19:24.71
! Generated by wb_print_wbl 15-MAY-2020 08:19:24.71
! Volume CVolPwrtest01
! Volume CVolPwrtest01
! Version V5.7.1
! Version V5.7.1
Volume CVolPwrtest01 $ClassVolume 0.0.2
54
.254
Volume CVolPwrtest01 $ClassVolume 0.0.2
40
.254
Body SysBody 01-JAN-1970 01:00:00.00
Body SysBody 01-JAN-1970 01:00:00.00
Attr NextOix = "_X10"
Attr NextOix = "_X10"
Attr NextCix = "_X12"
Attr NextCix = "_X12"
...
...
project/pwrtest01/src/db/directory.wb_load
View file @
c200dd96
! Generated by wb_print_wbl 0
3-SEP-2020 16:41:51.54
! Generated by wb_print_wbl 0
9-SEP-2020 14:12:41.30
! Volume directory
! Volume directory
! Version V5.7.1
! Version V5.7.1
Volume directory $DirectoryVolume 254.254.254.253
Volume directory $DirectoryVolume 254.254.254.253
...
@@ -16,7 +16,7 @@ Volume directory $DirectoryVolume 254.254.254.253
...
@@ -16,7 +16,7 @@ Volume directory $DirectoryVolume 254.254.254.253
Attr BusNumber = 999
Attr BusNumber = 999
EndBody
EndBody
Object PwrTest01a NodeConfig 10 25-MAR-2020 09:04:16.06
Object PwrTest01a NodeConfig 10 25-MAR-2020 09:04:16.06
Body RtBody 0
3-SEP-2020 16:41:51.48
Body RtBody 0
9-SEP-2020 14:12:41.27
Attr NodeName = "pwrtest01a"
Attr NodeName = "pwrtest01a"
Attr OperatingSystem = 128
Attr OperatingSystem = 128
Attr Address = "10.255.100.1"
Attr Address = "10.255.100.1"
...
@@ -44,6 +44,11 @@ Volume directory $DirectoryVolume 254.254.254.253
...
@@ -44,6 +44,11 @@ Volume directory $DirectoryVolume 254.254.254.253
Attr Source = "$pwrp_exe/ra_nethtest"
Attr Source = "$pwrp_exe/ra_nethtest"
EndBody
EndBody
EndObject
EndObject
Object ra_qcom2test ApplDistribute 78 08-SEP-2020 09:28:34.89
Body DevBody 08-SEP-2020 09:28:41.18
Attr Source = "$pwrp_exe/ra_qcom2test"
EndBody
EndObject
Object ra_testall_a ApplDistribute 77 03-SEP-2020 16:11:55.02
Object ra_testall_a ApplDistribute 77 03-SEP-2020 16:11:55.02
Body DevBody 03-SEP-2020 16:11:59.71
Body DevBody 03-SEP-2020 16:11:59.71
Attr Source = "$pwrp_exe/ra_testall_a.sh"
Attr Source = "$pwrp_exe/ra_testall_a.sh"
...
@@ -52,7 +57,7 @@ Volume directory $DirectoryVolume 254.254.254.253
...
@@ -52,7 +57,7 @@ Volume directory $DirectoryVolume 254.254.254.253
EndObject
EndObject
EndObject
EndObject
Object PwrTest01b NodeConfig 26 25-MAR-2020 09:06:55.29
Object PwrTest01b NodeConfig 26 25-MAR-2020 09:06:55.29
Body RtBody 0
3-SEP-2020 16:41:51.48
Body RtBody 0
9-SEP-2020 14:12:41.27
Attr NodeName = "pwrtest01b"
Attr NodeName = "pwrtest01b"
Attr OperatingSystem = 128
Attr OperatingSystem = 128
Attr Address = "10.255.100.2"
Attr Address = "10.255.100.2"
...
@@ -75,10 +80,20 @@ Volume directory $DirectoryVolume 254.254.254.253
...
@@ -75,10 +80,20 @@ Volume directory $DirectoryVolume 254.254.254.253
Attr Source = "$pwrp_exe/ra_status"
Attr Source = "$pwrp_exe/ra_status"
EndBody
EndBody
EndObject
EndObject
Object ra_qcom2test ApplDistribute 79 08-SEP-2020 09:28:52.65
Body DevBody 08-SEP-2020 09:28:52.65
Attr Source = "$pwrp_exe/ra_qcom2test"
EndBody
EndObject
Object ra_testall_b ApplDistribute 80 08-SEP-2020 13:16:48.30
Body DevBody 08-SEP-2020 13:16:51.30
Attr Source = "$pwrp_exe/ra_testall_b.sh"
EndBody
EndObject
EndObject
EndObject
EndObject
EndObject
Object PwrTest01c NodeConfig 33 26-MAR-2020 10:23:36.40
Object PwrTest01c NodeConfig 33 26-MAR-2020 10:23:36.40
Body RtBody 0
3-SEP-2020 16:41:51.48
Body RtBody 0
9-SEP-2020 14:12:41.27
Attr NodeName = "pwrtest01c"
Attr NodeName = "pwrtest01c"
Attr OperatingSystem = 128
Attr OperatingSystem = 128
Attr Address = "127.0.0.1"
Attr Address = "127.0.0.1"
...
@@ -180,7 +195,7 @@ Volume directory $DirectoryVolume 254.254.254.253
...
@@ -180,7 +195,7 @@ Volume directory $DirectoryVolume 254.254.254.253
EndObject
EndObject
EndObject
EndObject
Object PwrTest01d SevNodeConfig 38 26-MAR-2020 10:24:30.82
Object PwrTest01d SevNodeConfig 38 26-MAR-2020 10:24:30.82
Body RtBody 0
3-SEP-2020 16:41:51.48
Body RtBody 0
9-SEP-2020 14:12:41.27
Attr NodeName = "pwrtest01d"
Attr NodeName = "pwrtest01d"
Attr OperatingSystem = 128
Attr OperatingSystem = 128
Attr Address = "10.255.100.3"
Attr Address = "10.255.100.3"
...
@@ -200,7 +215,7 @@ Volume directory $DirectoryVolume 254.254.254.253
...
@@ -200,7 +215,7 @@ Volume directory $DirectoryVolume 254.254.254.253
Body RtBody 01-JUN-2020 10:06:31.24
Body RtBody 01-JUN-2020 10:06:31.24
Attr BusNumber = 998
Attr BusNumber = 998
EndBody
EndBody
Object
PwrTest01c NodeConfig 56 01-JUN-2020 10:05:00.49
Object
copper_arrow NodeConfig 56 09-SEP-2020 09:28:40.87
Body RtBody 01-JUN-2020 10:05:00.49
Body RtBody 01-JUN-2020 10:05:00.49
Attr NodeName = "copper-arrow"
Attr NodeName = "copper-arrow"
Attr OperatingSystem = 128
Attr OperatingSystem = 128
...
...
project/pwrtest01/src/db/pwrp_cnf_bootlist.dat
View file @
c200dd96
...
@@ -2,4 +2,4 @@ VolPwrTest01a 0.254.254.201 PwrTest01a pwrtest01a 999 128 0.000000 0
...
@@ -2,4 +2,4 @@ VolPwrTest01a 0.254.254.201 PwrTest01a pwrtest01a 999 128 0.000000 0
VolPwrTest01b 0.254.254.202 PwrTest01b pwrtest01b 999 128 0.000000 0
VolPwrTest01b 0.254.254.202 PwrTest01b pwrtest01b 999 128 0.000000 0
VolPwrTest01c 0.254.254.203 PwrTest01c pwrtest01c 999 128 0.000000 0
VolPwrTest01c 0.254.254.203 PwrTest01c pwrtest01c 999 128 0.000000 0
VolPwrTest01d 0.254.254.204 PwrTest01d pwrtest01d 999 128 0.000000 1
VolPwrTest01d 0.254.254.204 PwrTest01d pwrtest01d 999 128 0.000000 1
VolPwrTest01c 0.254.254.203
PwrTest01c
copper-arrow 998 128 0.000000 0
VolPwrTest01c 0.254.254.203
copper_arrow
copper-arrow 998 128 0.000000 0
project/pwrtest01/src/db/pwrp_cnf_distribute.dat
View file @
c200dd96
...
@@ -22,6 +22,7 @@ appl pwrtest01a S $pwrp_web/*.pdf
...
@@ -22,6 +22,7 @@ appl pwrtest01a S $pwrp_web/*.pdf
appl pwrtest01a S $pwrp_web/*.pwg
appl pwrtest01a S $pwrp_web/*.pwg
appl pwrtest01a E $pwrp_exe/ra_status
appl pwrtest01a E $pwrp_exe/ra_status
appl pwrtest01a E $pwrp_exe/ra_nethtest
appl pwrtest01a E $pwrp_exe/ra_nethtest
appl pwrtest01a E $pwrp_exe/ra_qcom2test
appl pwrtest01a E $pwrp_exe/ra_testall_a.sh
appl pwrtest01a E $pwrp_exe/ra_testall_a.sh
node pwrtest01b 128 999 0 - -
node pwrtest01b 128 999 0 - -
load pwrtest01b
load pwrtest01b
...
@@ -45,6 +46,8 @@ appl pwrtest01b S $pwrp_web/*.jpg
...
@@ -45,6 +46,8 @@ appl pwrtest01b S $pwrp_web/*.jpg
appl pwrtest01b S $pwrp_web/*.pdf
appl pwrtest01b S $pwrp_web/*.pdf
appl pwrtest01b S $pwrp_web/*.pwg
appl pwrtest01b S $pwrp_web/*.pwg
appl pwrtest01b E $pwrp_exe/ra_status
appl pwrtest01b E $pwrp_exe/ra_status
appl pwrtest01b E $pwrp_exe/ra_qcom2test
appl pwrtest01b E $pwrp_exe/ra_testall_b.sh
node pwrtest01c 128 999 0 - -
node pwrtest01c 128 999 0 - -
load pwrtest01c
load pwrtest01c
appl pwrtest01c W $pwrp_cnf/pwrtest01c/pwr_user2.dat:$pwra_db/pwr_user2.dat $pwra_db/pwr_user2.dat
appl pwrtest01c W $pwrp_cnf/pwrtest01c/pwr_user2.dat:$pwra_db/pwr_user2.dat $pwra_db/pwr_user2.dat
...
...
project/pwrtest01/src/db/pwrp_cnf_volumelist.dat
View file @
c200dd96
CVolPwrtest01 0.0.2
54
.254 ClassVolume cnf 0
CVolPwrtest01 0.0.2
40
.254 ClassVolume cnf 0
VolPwrTest01a 0.254.254.201 RootVolume cnf 0
VolPwrTest01a 0.254.254.201 RootVolume cnf 0
VolPwrTest01b 0.254.254.202 RootVolume cnf 0
VolPwrTest01b 0.254.254.202 RootVolume cnf 0
VolPwrTest01c 0.254.254.203 RootVolume cnf 0
VolPwrTest01c 0.254.254.203 RootVolume cnf 0
...
...
project/pwrtest01/src/db/wb_history.log
View file @
c200dd96
This diff is collapsed.
Click to expand it.
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