Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 338891 - dev-libs/glib fails tests on hardened (run-assert-msg-test)
Summary: dev-libs/glib fails tests on hardened (run-assert-msg-test)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2010-09-27 08:43 UTC by Xake
Modified: 2010-10-06 21:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
add paxmarkings for test (glib-hardened-test.patch,624 bytes, patch)
2010-09-28 15:32 UTC, Xake
Details | Diff
New patch with unconditional inherit and conditional pax-mark (glib-ebuild-hardened.patch,717 bytes, patch)
2010-09-29 09:19 UTC, Xake
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2010-09-27 08:43:53 UTC
Is there a way to just disable one certain test for glib and hardened?

The problem with run-assert-msg-test is that it uses gdb to search for a symbol. On hardened unless the executable to be debugged is marked using "paxctl -mr" the backtrace is broken. And because the testsuite does not mark the exec with those pax-flags the test fails. If you by hand mark the file, the test works, but this is hard to be done in a automated fashion inside of the build process without altering the Makefiles.

So again, is there a possibility to just disable this tests for hardened users?
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-09-28 12:34:18 UTC
> So again, is there a possibility to just disable this tests for hardened users?
no, according to what you said, it'd be more interesting to fix the root cause since it looks like it's feasible. However, a build.log would help a log in figuring out your issue.
Comment 2 Xake 2010-09-28 15:32:58 UTC
Created attachment 248911 [details, diff]
add paxmarkings for test

You mean something like this?

Tested on my system and works.
Comment 3 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-09-29 08:42:33 UTC
(In reply to comment #2)
> Created an attachment (id=248911) [details]
> add paxmarkings for test
> 
> You mean something like this?
> 
> Tested on my system and works.
> 

The patch is incorrect, inherits should not be conditional on runtime changes (because it invalidates metadata cache at runtime), and the pax-mark should be conditional on the system being hardened (so it doesn't fail on non-hardened systems).
Comment 4 Xake 2010-09-29 09:19:26 UTC
Created attachment 248952 [details, diff]
New patch with unconditional inherit and conditional pax-mark

(In reply to comment #3)
> The patch is incorrect, inherits should not be conditional on runtime changes
> (because it invalidates metadata cache at runtime),

I tried to let people not running hardened not having to depend on pax-utils, but on the other hand portage still does. 

> and the pax-mark should be
> conditional on the system being hardened (so it doesn't fail on non-hardened
> systems).
> 

Non-problem, but fixed anyway.;)
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-10-06 21:53:34 UTC
+  06 Oct 2010; Gilles Dartiguelongue <eva@gentoo.org> glib-2.24.2.ebuild,
+  glib-2.26.0.ebuild,
+  +files/glib-2.26.0-disable-locale-sensitive-test.patch,
+  +files/glib-2.26.0-disable-volumemonitor-broken-test.patch:
+  Fix testsuite failure on hardened, bug #338891. Disable visibility with
+  USE=debug, bug #274647. Disable 3 tests in the 2.26 testsuite to allow a
+  successful run and sync the ebuild back with latest changes in 2.24.

Fixed in 2.24 and later. Thanks for reporting.