[Spice-devel] [PATCH libcacard v2 16/35] tests: Verify Applet information is present in properties

Jakub Jelen jjelen at redhat.com
Thu Aug 2 09:43:48 UTC 2018


Signed-off-by: Jakub Jelen <jjelen at redhat.com>
Reviewed-by: Robert Relyea <rrelyea at redhat.com>
---
 tests/libcacard.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/libcacard.c b/tests/libcacard.c
index 67bd0be..97ba2ab 100644
--- a/tests/libcacard.c
+++ b/tests/libcacard.c
@@ -165,6 +165,7 @@ static void get_properties(VReader *reader, int object_type)
     };
     int verified_pki_properties = 0;
     int num_objects = 0, num_objects_expected = -1;
+    int have_applet_information = 0;
 
     status = vreader_xfr_bytes(reader,
                                get_properties, sizeof(get_properties),
@@ -203,6 +204,7 @@ static void get_properties(VReader *reader, int object_type)
         case 0x01: /* Applet Information */
             g_assert_cmpint(vlen, ==, 5);
             g_assert_cmphex(*p, ==, 0x10); /* Applet family */
+            have_applet_information = 1;
             break;
 
         case 0x40: /* Number of objects */
@@ -280,6 +282,8 @@ static void get_properties(VReader *reader, int object_type)
         g_assert_cmpint(verified_pki_properties, ==, 1);
     }
 
+    g_assert_cmpint(have_applet_information, ==, 1);
+
     dwRecvLength = APDUBufSize;
     status = vreader_xfr_bytes(reader,
                                get_properties_tag, sizeof(get_properties_tag),
-- 
2.17.1



More information about the Spice-devel mailing list