Bug 983891 - regression in atk_role_register for empty string
regression in atk_role_register for empty string
Product: Fedora
Classification: Fedora
Component: atk (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Matthias Clasen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-07-12 03:45 EDT by Karel Srot
Modified: 2015-02-17 11:05 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 983892 (view as bug list)
Last Closed: 2015-02-17 11:05:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Karel Srot 2013-07-12 03:45:41 EDT
Following regression causing failures in LSB 4.1 test suite.

Description of problem:

$ # test
$ rpm -q atk
$ ./a.out 
testing name: 'my new role' OK
testing name: ' ' OK
testing name: '' OK

$ rpm -q atk
$ ./a.out 
testing name: 'my new role' OK
testing name: ' ' OK
testing name: '' FAIL

$ cat atk_test.c 
#include <stdio.h>
#include <atk/atk.h>

int test(char *name) {

  AtkRole role;
  AtkRole role_get;

  role = atk_role_register(name);
  role_get = atk_role_for_name(name);

  printf("testing name: '%s' ", name);
  if (role != role_get) {
    return 1;
  } else {

  return 0;

int main() {
  test("my new role");
  test(" ");
  return 0;
Comment 1 Alejandro Piñeiro 2013-12-09 13:21:00 EST
While working on https://bugzilla.gnome.org/show_bug.cgi?id=720117 I found by chance this one.

Using an empty string, or a string with only whitespace should not be a valid name for a new role registered. So testing name ' ' and testing name '' should fail. I have added some code in order to return ATK_ROLE_INVALID on those cases. You can see the commit here:

With that in mind, the correct would be update the tests cases, in order to check that registering names with that format return ATK_ROLE_INVALID.

Having said so, bug 720117 asks to deprecate that method, something that was done. Since today, atk_role_register is deprecated on master, and next week that would be included on a new ATK release. So probably the other option is stop to include tests about that method on the test suite.
Comment 2 Fedora End Of Life 2015-01-09 13:52:12 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 3 Fedora End Of Life 2015-02-17 11:05:57 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.