jolly has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42786?usp=email )


Change subject: CCID: Check if parameters keep unchanged, if set without change.
......................................................................

CCID: Check if parameters keep unchanged, if set without change.

Using SetParameters with the current set of parameter must not cause
them to change.

Change-Id: Id1bf5e58ba910d0633104b3bc3e902ce7d31cb10
---
M ccid/CCID_Tests.ttcn
1 file changed, 32 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/86/42786/1

diff --git a/ccid/CCID_Tests.ttcn b/ccid/CCID_Tests.ttcn
index d158f64..566cb3e 100644
--- a/ccid/CCID_Tests.ttcn
+++ b/ccid/CCID_Tests.ttcn
@@ -350,6 +350,37 @@
        f_start_and_wait();
 }

+/* SetParameters: verify acceptance of unchanged setting */
+private function f_TC_set_params_nochange() runs on Slot_CT
+{
+       var CCID_PDU set_par, get_par;
+       f_ccid_power_on();
+
+       /* get current parameters */
+       set_par := f_ccid_get_par();
+
+       /* send unmodified */
+       get_par := f_ccid_set_par(set_par.u.Parameters.abProtocolData);
+
+       /* check if they still match */
+       if (match(set_par.u.Parameters.abProtocolData, 
get_par.u.Parameters.abProtocolData)) {
+               setverdict(pass);
+       } else {
+               setverdict(fail, "SetParameters changed parameters unexpected");
+       }
+}
+testcase TC_set_params_nochange() runs on Test_CT
+{
+       var integer i;
+
+       f_init();
+
+       for (i := 0; i < mp_use_slot_count; i := i+1) {
+               f_start_handler(refers(f_TC_set_params_nochange), i);
+       }
+       f_start_and_wait();
+}
+


 /* TODO */
@@ -469,6 +500,7 @@
                execute( TC_set_params() );
                execute( TC_reset_params() );
        }
+       execute( TC_set_params_nochange() );

        /* error handling */
        execute( TC_inval_slot() );

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42786?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id1bf5e58ba910d0633104b3bc3e902ce7d31cb10
Gerrit-Change-Number: 42786
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <[email protected]>

Reply via email to