Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 727822 - sys-apps/kbd fails test dumpkeys-bkeymap on big-endian archs
Summary: sys-apps/kbd fails test dumpkeys-bkeymap on big-endian archs
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2020-06-10 12:00 UTC by Agostino Sarubbo
Modified: 2020-06-18 15:27 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,215.19 KB, text/plain)
2020-06-10 12:00 UTC, Agostino Sarubbo
Details
test logs (sys-apps_kbd-2.2.0-r2_use_Qix3K.tar.xz,892 bytes, application/x-xz)
2020-06-11 13:52 UTC, Rolf Eike Beer
Details
temporary file of failing test (temp.XAeAhAyPJ,8.26 KB, application/octet-stream)
2020-06-11 14:52 UTC, Rolf Eike Beer
Details
test-suite.log (test-suite.log,713 bytes, text/plain)
2020-06-12 09:06 UTC, Agostino Sarubbo
Details
test-suite.log (test-suite.log,713 bytes, text/plain)
2020-06-12 09:06 UTC, Agostino Sarubbo
Details
test-suite.log (test-suite.log,713 bytes, text/plain)
2020-06-12 09:13 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-06-10 12:00:09 UTC
@@This is an auto-filed bug@@
If you think that a different summary clarifies the issue better, feel free to change it

Issue: sys-apps/kbd fails tests.
Discovered on: sparc

NOTE:
If you need further logs, feel free to ask.
Comment 1 Agostino Sarubbo gentoo-dev 2020-06-10 12:00:20 UTC
Created attachment 644280 [details]
build.log

build log and emerge --info
Comment 2 Mike Gilbert gentoo-dev 2020-06-10 17:04:39 UTC
Please attach tests/testsuite.log.
Comment 3 Mike Gilbert gentoo-dev 2020-06-10 17:06:31 UTC
I'm unable to reproduce this, so I'm unblocking the stable request.
Comment 4 Agostino Sarubbo gentoo-dev 2020-06-11 08:50:43 UTC
(In reply to Mike Gilbert from comment #3)
> I'm unable to reproduce this, so I'm unblocking the stable request.

Usually I don't like arguing for fun, so this is just my opinion:

While you (saying you but is a general concept) are asking for a stable request, you are asking the arch team to verify the package on a particular architecture.
If the people you have asked to verify finds a bug, I guess it should be considered valid and confirmed.
If from further tests we verify that it s an AT fault then we can unblock the stabilization; otherwise, in my opinion, it make no sense. It looks like you don't trust the report.

I understand your point of view since you can't reproduce, but if this is not an urgent security hole we can wait a bit to understand the problem.
Comment 5 Mike Gilbert gentoo-dev 2020-06-11 12:57:59 UTC
(In reply to Agostino Sarubbo from comment #4)

I unblocked it so that other people would actually test the package.
Comment 6 Mike Gilbert gentoo-dev 2020-06-11 13:00:11 UTC
(In reply to Agostino Sarubbo from comment #4)
> If from further tests we verify that it s an AT fault then we can unblock
> the stabilization; otherwise, in my opinion, it make no sense. It looks like
> you don't trust the report.

These automated reports without sufficient information are not terribly useful. If you provided more information up front, I might not have made the same decision.
Comment 7 Mike Gilbert gentoo-dev 2020-06-11 13:12:55 UTC
To expand a bit further on my thought process:

With the information I have available, I know that the tests pass on ~amd64, and fail on sparc. That tells me there is probably some arch-specific issue, or some issue between ~arch and arch.

If I had test-suite.log available, there might be further evidence indicating an arch-independent bug. But I don't have that file, and I must work with the limited information you have given me.

I assume that once a stable request bug has been blocked by a test failure bug, arch teams will ignore the stable request. Is that assumption valid?

Assuming it is valid, I don't want to block other arch teams from testing this package. It is possible/likely that it works just fine on most archs.
Comment 8 Rolf Eike Beer archtester 2020-06-11 13:52:10 UTC
Created attachment 644372 [details]
test logs

The relevant one is this:

FAIL: dumpkeys-bkeymap
======================

++ readlink -ev .
+ cwd=/var/tmp/portage/sys-apps/kbd-2.2.0-r2/work/kbd-2.2.0/tests
+ cd /var/tmp/portage/sys-apps/kbd-2.2.0-r2/work/kbd-2.2.0/tests
+ rc=0
++ mktemp ./temp.XXXXXXXXX
+ temp=./temp.HK4tsKB7q
+ datadir=.
+ ./libkeymap-bkeymap ./../data/keymaps/i386/qwerty/defkeymap.map
+ cmp -s ./data/dumpkeys-bkeymap/bkeymap.bin ./temp.HK4tsKB7q
+ rc=1
+ '[' 1 '!=' 0 ']'
+ printf 'failed\n'
failed
+ exit 1
FAIL dumpkeys-bkeymap (exit status: 1)
Comment 9 Mike Gilbert gentoo-dev 2020-06-11 14:22:05 UTC
This apparently fails on bot 32-bit and 64-bit sparc.
Comment 10 Rolf Eike Beer archtester 2020-06-11 14:52:46 UTC
Created attachment 644388 [details]
temporary file of failing test

The testfile from hppa, where it fails the same.
Comment 11 Mike Gilbert gentoo-dev 2020-06-11 14:59:32 UTC
Thanks. I'm guessing this might be a big/little-endian issue, and I'll take a look at the file to confirm that.
Comment 12 Mike Gilbert gentoo-dev 2020-06-11 16:14:52 UTC
ago confirmed that this passes on ARM (little-endian) and fails on PowerPC (big-endian).
Comment 13 Agostino Sarubbo gentoo-dev 2020-06-12 09:06:21 UTC
Created attachment 644494 [details]
test-suite.log

test-suite.log on ppc
Comment 14 Agostino Sarubbo gentoo-dev 2020-06-12 09:06:37 UTC
Created attachment 644496 [details]
test-suite.log

test-suite.log on ppc64
Comment 15 Agostino Sarubbo gentoo-dev 2020-06-12 09:13:02 UTC
Created attachment 644498 [details]
test-suite.log

test-suite.log on s390
Comment 16 Stephan Hartmann (RETIRED) gentoo-dev 2020-06-12 09:30:12 UTC
In src/libkeymap/dump.c we have:

int lk_dump_bkeymap(struct lk_ctx *ctx, FILE *fd)
{
...
                        int v = lk_get_key(ctx, i, j);

                        if (fwrite(&v, sizeof(v), 1, fd) != 1)
                                goto fail;
...
}

The fwrite works for litte-endian, but for big-endian bytes are swapped.
Comment 17 Mike Gilbert gentoo-dev 2020-06-18 15:27:50 UTC
This is a faulty test case, and should not block stabilization.