All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH_v3 0/3] Add new scripts for GCF testing
       [not found] <$>
@ 2012-08-02  9:41 ` Guillaume Zajac
  2012-08-02  9:41   ` [PATCH_v3 1/3] test: Add hold-and-answer script " Guillaume Zajac
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Guillaume Zajac @ 2012-08-02  9:41 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

Hi,

Chnage log from v2:
	- adding hangup-call script to hangup a call in specifying its ID.
	  It is needed for 3GPP 51.010 test case 31.4.2.1.4
	- Fixing some indentation issue in hangup script
	- Renaming hangup script into hangup-call-state

Guillaume Zajac (3):
  test: Add hold-and-answer script for GCF testing
  test: Add hangup-call-state script for GCF testing
  test: Add hangup-call script for GCF testing

 Makefile.am            |    5 +++-
 test/hangup-call       |   39 +++++++++++++++++++++++++++++++++++
 test/hangup-call-state |   53 ++++++++++++++++++++++++++++++++++++++++++++++++
 test/hold-and-answer   |   20 ++++++++++++++++++
 4 files changed, 116 insertions(+), 1 deletions(-)
 create mode 100755 test/hangup-call
 create mode 100755 test/hangup-call-state
 create mode 100755 test/hold-and-answer

-- 
1.7.5.4


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH_v3 1/3] test: Add hold-and-answer script for GCF testing
  2012-08-02  9:41 ` [PATCH_v3 0/3] Add new scripts for GCF testing Guillaume Zajac
@ 2012-08-02  9:41   ` Guillaume Zajac
  2012-08-02 19:24     ` Marcel Holtmann
  2012-08-02  9:41   ` [PATCH_v3 2/3] test: Add hangup-call-state " Guillaume Zajac
  2012-08-02  9:41   ` [PATCH_v3 3/3] test: Add hangup-call " Guillaume Zajac
  2 siblings, 1 reply; 8+ messages in thread
From: Guillaume Zajac @ 2012-08-02  9:41 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

---
 Makefile.am          |    3 ++-
 test/hold-and-answer |   20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletions(-)
 create mode 100755 test/hold-and-answer

diff --git a/Makefile.am b/Makefile.am
index b35cf1f..4410043 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -622,7 +622,8 @@ test_scripts = test/backtrace \
 		test/set-context-property \
 		test/test-gnss \
 		test/swap-calls \
-		test/release-and-answer
+		test/release-and-answer \
+		test/hold-and-answer
 
 if TEST
 testdir = $(pkglibdir)/test
diff --git a/test/hold-and-answer b/test/hold-and-answer
new file mode 100755
index 0000000..2c47e27
--- /dev/null
+++ b/test/hold-and-answer
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+						'org.ofono.Manager')
+
+modems = manager.GetModems()
+modem = modems[0][0]
+
+if (len(sys.argv) == 2):
+	modem = sys.argv[1]
+
+manager = dbus.Interface(bus.get_object('org.ofono', modem),
+						'org.ofono.VoiceCallManager')
+
+manager.HoldAndAnswer(timeout=100)
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH_v3 2/3] test: Add hangup-call-state script for GCF testing
  2012-08-02  9:41 ` [PATCH_v3 0/3] Add new scripts for GCF testing Guillaume Zajac
  2012-08-02  9:41   ` [PATCH_v3 1/3] test: Add hold-and-answer script " Guillaume Zajac
@ 2012-08-02  9:41   ` Guillaume Zajac
  2012-08-02  9:41   ` [PATCH_v3 3/3] test: Add hangup-call " Guillaume Zajac
  2 siblings, 0 replies; 8+ messages in thread
From: Guillaume Zajac @ 2012-08-02  9:41 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1941 bytes --]

---
 Makefile.am            |    3 +-
 test/hangup-call-state |   53 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletions(-)
 create mode 100755 test/hangup-call-state

diff --git a/Makefile.am b/Makefile.am
index 4410043..a689483 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -623,7 +623,8 @@ test_scripts = test/backtrace \
 		test/test-gnss \
 		test/swap-calls \
 		test/release-and-answer \
-		test/hold-and-answer
+		test/hold-and-answer \
+		test/hangup-call-state
 
 if TEST
 testdir = $(pkglibdir)/test
diff --git a/test/hangup-call-state b/test/hangup-call-state
new file mode 100755
index 0000000..0be2dea
--- /dev/null
+++ b/test/hangup-call-state
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+						'org.ofono.Manager')
+
+modems = manager.GetModems()
+path = modems[0][0]
+
+manager = dbus.Interface(bus.get_object('org.ofono', path),
+						'org.ofono.VoiceCallManager')
+
+calls = manager.GetCalls()
+if (len(calls) == 0):
+	print "No calls available"
+	sys.exit(1)
+
+if (len(sys.argv) < 2):
+	print
+	print "[ call path ]		< call state >"
+	print
+	for path, properties in calls:
+		state = properties["State"]
+		print "[ %s ] < %s >" % (path, state)
+		print
+
+	print "Usage: %s < call state >" % (sys.argv[0])
+	print
+	sys.exit(1)
+
+cstate = sys.argv[1]
+
+if (cstate != "active" and cstate != "waiting" and cstate != "held"):
+	print "Valid < call state > is active / waiting / held"
+	sys.exit(1)
+
+for path, properties in calls:
+		print
+		state = properties["State"]
+		print "[ %s ] < %s >" % (path, state)
+		print
+
+		if state != cstate:
+			continue
+
+		call = dbus.Interface(bus.get_object('org.ofono', path),
+						'org.ofono.VoiceCall')
+
+		call.Hangup()
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH_v3 3/3] test: Add hangup-call script for GCF testing
  2012-08-02  9:41 ` [PATCH_v3 0/3] Add new scripts for GCF testing Guillaume Zajac
  2012-08-02  9:41   ` [PATCH_v3 1/3] test: Add hold-and-answer script " Guillaume Zajac
  2012-08-02  9:41   ` [PATCH_v3 2/3] test: Add hangup-call-state " Guillaume Zajac
@ 2012-08-02  9:41   ` Guillaume Zajac
  2012-08-02 19:21     ` Marcel Holtmann
  2 siblings, 1 reply; 8+ messages in thread
From: Guillaume Zajac @ 2012-08-02  9:41 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]

---
 Makefile.am      |    3 ++-
 test/hangup-call |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletions(-)
 create mode 100755 test/hangup-call

diff --git a/Makefile.am b/Makefile.am
index a689483..534245e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -624,7 +624,8 @@ test_scripts = test/backtrace \
 		test/swap-calls \
 		test/release-and-answer \
 		test/hold-and-answer \
-		test/hangup-call-state
+		test/hangup-call-state \
+		test/hangup-call
 
 if TEST
 testdir = $(pkglibdir)/test
diff --git a/test/hangup-call b/test/hangup-call
new file mode 100755
index 0000000..926efc4
--- /dev/null
+++ b/test/hangup-call
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+						'org.ofono.Manager')
+
+modems = manager.GetModems()
+path = modems[0][0]
+
+manager = dbus.Interface(bus.get_object('org.ofono', path),
+						'org.ofono.VoiceCallManager')
+
+calls = manager.GetCalls()
+if (len(calls) == 0):
+	print "No calls available"
+	sys.exit(1)
+
+if (len(sys.argv) < 2):
+	i = 0
+	for path, properties in calls:
+		multi = properties["Multiparty"]
+		print "Call ID [ %d ] Multiparty %d" % (i, multi)
+		print
+		i += 1
+
+	print "Usage: %s [ Call ID ]" % (sys.argv[0])
+	print
+	sys.exit(1)
+
+path = calls[int(sys.argv[1])][0]
+
+call = dbus.Interface(bus.get_object('org.ofono', path),
+						'org.ofono.VoiceCall')
+
+call.Hangup()
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH_v3 3/3] test: Add hangup-call script for GCF testing
  2012-08-02  9:41   ` [PATCH_v3 3/3] test: Add hangup-call " Guillaume Zajac
@ 2012-08-02 19:21     ` Marcel Holtmann
  2012-08-03  8:47       ` Guillaume Zajac
  0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2012-08-02 19:21 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2059 bytes --]

Hi Guillaume,

>  Makefile.am      |    3 ++-
>  test/hangup-call |   39 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 41 insertions(+), 1 deletions(-)
>  create mode 100755 test/hangup-call
> 
> diff --git a/Makefile.am b/Makefile.am
> index a689483..534245e 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -624,7 +624,8 @@ test_scripts = test/backtrace \
>  		test/swap-calls \
>  		test/release-and-answer \
>  		test/hold-and-answer \
> -		test/hangup-call-state
> +		test/hangup-call-state \
> +		test/hangup-call
>  
>  if TEST
>  testdir = $(pkglibdir)/test
> diff --git a/test/hangup-call b/test/hangup-call
> new file mode 100755
> index 0000000..926efc4
> --- /dev/null
> +++ b/test/hangup-call
> @@ -0,0 +1,39 @@
> +#!/usr/bin/python
> +
> +import sys
> +import dbus
> +
> +bus = dbus.SystemBus()
> +
> +manager = dbus.Interface(bus.get_object('org.ofono', '/'),
> +						'org.ofono.Manager')
> +
> +modems = manager.GetModems()
> +path = modems[0][0]
> +
> +manager = dbus.Interface(bus.get_object('org.ofono', path),
> +						'org.ofono.VoiceCallManager')
> +
> +calls = manager.GetCalls()
> +if (len(calls) == 0):
> +	print "No calls available"
> +	sys.exit(1)
> +
> +if (len(sys.argv) < 2):
> +	i = 0
> +	for path, properties in calls:
> +		multi = properties["Multiparty"]
> +		print "Call ID [ %d ] Multiparty %d" % (i, multi)
> +		print
> +		i += 1
> +
> +	print "Usage: %s [ Call ID ]" % (sys.argv[0])
> +	print
> +	sys.exit(1)
> +
> +path = calls[int(sys.argv[1])][0]
> +
> +call = dbus.Interface(bus.get_object('org.ofono', path),
> +						'org.ofono.VoiceCall')
> +
> +call.Hangup()

why are we not just asking to provide the object path as argument and
then list-calls can be used to determine which call to hang up. That way
also the hangup-call-state hack is not needed.

Using the object path also makes this less racy since we identify the
call by object path and not a random number that might no longer be
valid.

Regards

Marcel



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH_v3 1/3] test: Add hold-and-answer script for GCF testing
  2012-08-02  9:41   ` [PATCH_v3 1/3] test: Add hold-and-answer script " Guillaume Zajac
@ 2012-08-02 19:24     ` Marcel Holtmann
  0 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2012-08-02 19:24 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

Hi Guillaume,

>  Makefile.am          |    3 ++-
>  test/hold-and-answer |   20 ++++++++++++++++++++
>  2 files changed, 22 insertions(+), 1 deletions(-)
>  create mode 100755 test/hold-and-answer

patch has been applied.

Regards

Marcel



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH_v3 3/3] test: Add hangup-call script for GCF testing
  2012-08-02 19:21     ` Marcel Holtmann
@ 2012-08-03  8:47       ` Guillaume Zajac
  2012-08-03 16:53         ` Marcel Holtmann
  0 siblings, 1 reply; 8+ messages in thread
From: Guillaume Zajac @ 2012-08-03  8:47 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2840 bytes --]

Hi Marcel,

On 02/08/2012 21:21, Marcel Holtmann wrote:
> Hi Guillaume,
>
>>   Makefile.am      |    3 ++-
>>   test/hangup-call |   39 +++++++++++++++++++++++++++++++++++++++
>>   2 files changed, 41 insertions(+), 1 deletions(-)
>>   create mode 100755 test/hangup-call
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index a689483..534245e 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -624,7 +624,8 @@ test_scripts = test/backtrace \
>>   		test/swap-calls \
>>   		test/release-and-answer \
>>   		test/hold-and-answer \
>> -		test/hangup-call-state
>> +		test/hangup-call-state \
>> +		test/hangup-call
>>   
>>   if TEST
>>   testdir = $(pkglibdir)/test
>> diff --git a/test/hangup-call b/test/hangup-call
>> new file mode 100755
>> index 0000000..926efc4
>> --- /dev/null
>> +++ b/test/hangup-call
>> @@ -0,0 +1,39 @@
>> +#!/usr/bin/python
>> +
>> +import sys
>> +import dbus
>> +
>> +bus = dbus.SystemBus()
>> +
>> +manager = dbus.Interface(bus.get_object('org.ofono', '/'),
>> +						'org.ofono.Manager')
>> +
>> +modems = manager.GetModems()
>> +path = modems[0][0]
>> +
>> +manager = dbus.Interface(bus.get_object('org.ofono', path),
>> +						'org.ofono.VoiceCallManager')
>> +
>> +calls = manager.GetCalls()
>> +if (len(calls) == 0):
>> +	print "No calls available"
>> +	sys.exit(1)
>> +
>> +if (len(sys.argv) < 2):
>> +	i = 0
>> +	for path, properties in calls:
>> +		multi = properties["Multiparty"]
>> +		print "Call ID [ %d ] Multiparty %d" % (i, multi)
>> +		print
>> +		i += 1
>> +
>> +	print "Usage: %s [ Call ID ]" % (sys.argv[0])
>> +	print
>> +	sys.exit(1)
>> +
>> +path = calls[int(sys.argv[1])][0]
>> +
>> +call = dbus.Interface(bus.get_object('org.ofono', path),
>> +						'org.ofono.VoiceCall')
>> +
>> +call.Hangup()
> why are we not just asking to provide the object path as argument and
> then list-calls can be used to determine which call to hang up. That way
> also the hangup-call-state hack is not needed.
>
> Using the object path also makes this less racy since we identify the
> call by object path and not a random number that might no longer be
> valid.

We can use voicecall path indeed, however this script will not be enough 
to clear all the remote parties of a multiparty call at once.
For instance, I have a 3GPP test case that ask me to do this:
     - create a multiparty call with 3 parties
     - create a new single call
     - clear multiparty call in held

I could either use the hangup-call-state script (with held argument) 
either create a new script using HangupMultiparty() method from 
voicecallmanager API (like there is a hangup-all script).
One of those scripts would avoid to call thrice hangup-call for a 
multiparty call with 3 party for instance.

Kind regards,
Guillaume

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH_v3 3/3] test: Add hangup-call script for GCF testing
  2012-08-03  8:47       ` Guillaume Zajac
@ 2012-08-03 16:53         ` Marcel Holtmann
  0 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2012-08-03 16:53 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3005 bytes --]

Hi Guillaume,

> >>   Makefile.am      |    3 ++-
> >>   test/hangup-call |   39 +++++++++++++++++++++++++++++++++++++++
> >>   2 files changed, 41 insertions(+), 1 deletions(-)
> >>   create mode 100755 test/hangup-call
> >>
> >> diff --git a/Makefile.am b/Makefile.am
> >> index a689483..534245e 100644
> >> --- a/Makefile.am
> >> +++ b/Makefile.am
> >> @@ -624,7 +624,8 @@ test_scripts = test/backtrace \
> >>   		test/swap-calls \
> >>   		test/release-and-answer \
> >>   		test/hold-and-answer \
> >> -		test/hangup-call-state
> >> +		test/hangup-call-state \
> >> +		test/hangup-call
> >>   
> >>   if TEST
> >>   testdir = $(pkglibdir)/test
> >> diff --git a/test/hangup-call b/test/hangup-call
> >> new file mode 100755
> >> index 0000000..926efc4
> >> --- /dev/null
> >> +++ b/test/hangup-call
> >> @@ -0,0 +1,39 @@
> >> +#!/usr/bin/python
> >> +
> >> +import sys
> >> +import dbus
> >> +
> >> +bus = dbus.SystemBus()
> >> +
> >> +manager = dbus.Interface(bus.get_object('org.ofono', '/'),
> >> +						'org.ofono.Manager')
> >> +
> >> +modems = manager.GetModems()
> >> +path = modems[0][0]
> >> +
> >> +manager = dbus.Interface(bus.get_object('org.ofono', path),
> >> +						'org.ofono.VoiceCallManager')
> >> +
> >> +calls = manager.GetCalls()
> >> +if (len(calls) == 0):
> >> +	print "No calls available"
> >> +	sys.exit(1)
> >> +
> >> +if (len(sys.argv) < 2):
> >> +	i = 0
> >> +	for path, properties in calls:
> >> +		multi = properties["Multiparty"]
> >> +		print "Call ID [ %d ] Multiparty %d" % (i, multi)
> >> +		print
> >> +		i += 1
> >> +
> >> +	print "Usage: %s [ Call ID ]" % (sys.argv[0])
> >> +	print
> >> +	sys.exit(1)
> >> +
> >> +path = calls[int(sys.argv[1])][0]
> >> +
> >> +call = dbus.Interface(bus.get_object('org.ofono', path),
> >> +						'org.ofono.VoiceCall')
> >> +
> >> +call.Hangup()
> > why are we not just asking to provide the object path as argument and
> > then list-calls can be used to determine which call to hang up. That way
> > also the hangup-call-state hack is not needed.
> >
> > Using the object path also makes this less racy since we identify the
> > call by object path and not a random number that might no longer be
> > valid.
> 
> We can use voicecall path indeed, however this script will not be enough 
> to clear all the remote parties of a multiparty call at once.
> For instance, I have a 3GPP test case that ask me to do this:
>      - create a multiparty call with 3 parties
>      - create a new single call
>      - clear multiparty call in held
> 
> I could either use the hangup-call-state script (with held argument) 
> either create a new script using HangupMultiparty() method from 
> voicecallmanager API (like there is a hangup-all script).
> One of those scripts would avoid to call thrice hangup-call for a 
> multiparty call with 3 party for instance.

sounds to me that hangup-multiparty script is a good idea.

Regards

Marcel



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-08-03 16:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <$>
2012-08-02  9:41 ` [PATCH_v3 0/3] Add new scripts for GCF testing Guillaume Zajac
2012-08-02  9:41   ` [PATCH_v3 1/3] test: Add hold-and-answer script " Guillaume Zajac
2012-08-02 19:24     ` Marcel Holtmann
2012-08-02  9:41   ` [PATCH_v3 2/3] test: Add hangup-call-state " Guillaume Zajac
2012-08-02  9:41   ` [PATCH_v3 3/3] test: Add hangup-call " Guillaume Zajac
2012-08-02 19:21     ` Marcel Holtmann
2012-08-03  8:47       ` Guillaume Zajac
2012-08-03 16:53         ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.