After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668945 - GLib-Net:ERROR:pkcs11-pin.c:104:test_set_get_value: assertion failure
GLib-Net:ERROR:pkcs11-pin.c:104:test_set_get_value: assertion failure
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
2.31.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-01-29 09:22 UTC by Priit Laes (IRC: plaes)
Modified: 2012-01-30 14:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Priit Laes (IRC: plaes) 2012-01-29 09:22:12 UTC
I'm getting following test failure in pkcs11 tests for glib-networking:

TEST: pkcs11-pin... (pid=1921)
  /pkcs11/pin/attributes:                                              OK
  /pkcs11/pin/warnings:                                                OK
  /pkcs11/pin/set-get-value:                                           **
GLib-Net:ERROR:pkcs11-pin.c:104:test_set_get_value: assertion failed ((const gchar *)value == "secret"): ("secretZ\267" == "secret")
FAIL
GTester: last random seed: R02Se9d98d9ed960651e1b7be9e33e2dbf2c

glib-networking-2.31.6
GNUTLS - 2.12.16
p11-kit-0.10

All other tests (gnome-proxy, libproxy, tls) pass
Comment 1 Priit Laes (IRC: plaes) 2012-01-29 09:33:01 UTC
Docs for p11_kit_pin_get_value:
 * p11_kit_pin_get_value:
 * @pin: the P11KitPin
 * @length: a location to return the value length
 *
 * Get the PIN value from a P11KitPin. @length will be set to the
 * length of the value.
 *
 * The value returned is owned by the P11KitPin and should not be modified.
 * It remains valid as long as a reference to the PIN is held. The PIN value
 * will not contain an extra null-terminator character.

Test does following:
g_assert_cmpstr ((const gchar *)value, ==, "secret");

But it should compare only the first 6 (or n_value) characters.
Comment 2 Dan Winship 2012-01-30 14:09:59 UTC
thanks, fixed in master