* [Buildroot] TestFileCapabilities is broken
@ 2018-10-14 13:25 Thomas Petazzoni
2018-10-14 14:26 ` Yann E. MORIN
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2018-10-14 13:25 UTC (permalink / raw)
To: buildroot
Hello,
The TestFileCapabilities test of our test suite is failing, with:
======================================================================
FAIL: test_run (tests.core.test_file_capabilities.TestFileCapabilities)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builds/buildroot.org/buildroot/support/testing/tests/core/test_file_capabilities.py", line 44, in test_run
self.assertIn("cap_kill", output[0])
AssertionError: 'cap_kill' not found in '/usr/sbin/getcap'
I did a local build, and I can reproduce the issue. What we do is we
run "getcap -v /usr/sbin/getcap" on the target, and it returns just:
# getcap -v /usr/sbin/getcap
/usr/sbin/getcap
And not any of the extended attributes that getcap is supposed to have.
I had a quick look, and makedevs gets run with a correct device table
when generating the common tarball. I don't know when extended
attributes are lost.
Could you have a look ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] TestFileCapabilities is broken
2018-10-14 13:25 [Buildroot] TestFileCapabilities is broken Thomas Petazzoni
@ 2018-10-14 14:26 ` Yann E. MORIN
2018-10-14 14:47 ` Ricardo Martincoski
0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2018-10-14 14:26 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2018-10-14 15:25 +0200, Thomas Petazzoni spake thusly:
> The TestFileCapabilities test of our test suite is failing, with:
>
> ======================================================================
> FAIL: test_run (tests.core.test_file_capabilities.TestFileCapabilities)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/builds/buildroot.org/buildroot/support/testing/tests/core/test_file_capabilities.py", line 44, in test_run
> self.assertIn("cap_kill", output[0])
> AssertionError: 'cap_kill' not found in '/usr/sbin/getcap'
>
> I did a local build, and I can reproduce the issue. What we do is we
> run "getcap -v /usr/sbin/getcap" on the target, and it returns just:
>
> # getcap -v /usr/sbin/getcap
> /usr/sbin/getcap
>
> And not any of the extended attributes that getcap is supposed to have.
> I had a quick look, and makedevs gets run with a correct device table
> when generating the common tarball. I don't know when extended
> attributes are lost.
>
> Could you have a look ?
So, I also did a test build here, and it indeed fails for me too. At
first glance, our mksquashfs has support for extended attributes:
$ ./tests/TestFileCapabilities/host/bin/mksquashfs -h
[...]
-no-xattrs don't store extended attributes
-xattrs store extended attributes (default)
[...]
Further investigation postponed, for cause of a visitor... ;-]
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] TestFileCapabilities is broken
2018-10-14 14:26 ` Yann E. MORIN
@ 2018-10-14 14:47 ` Ricardo Martincoski
2018-10-21 9:17 ` Yann E. MORIN
0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Martincoski @ 2018-10-14 14:47 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, Oct 14, 2018 at 11:26 AM, Yann E. MORIN wrote:
> On 2018-10-14 15:25 +0200, Thomas Petazzoni spake thusly:
>> The TestFileCapabilities test of our test suite is failing, with:
>>
>> ======================================================================
>> FAIL: test_run (tests.core.test_file_capabilities.TestFileCapabilities)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "/builds/buildroot.org/buildroot/support/testing/tests/core/test_file_capabilities.py", line 44, in test_run
>> self.assertIn("cap_kill", output[0])
>> AssertionError: 'cap_kill' not found in '/usr/sbin/getcap'
>>
>> I did a local build, and I can reproduce the issue. What we do is we
>> run "getcap -v /usr/sbin/getcap" on the target, and it returns just:
>>
>> # getcap -v /usr/sbin/getcap
>> /usr/sbin/getcap
>>
>> And not any of the extended attributes that getcap is supposed to have.
>> I had a quick look, and makedevs gets run with a correct device table
>> when generating the common tarball. I don't know when extended
>> attributes are lost.
This is bug #11216
>>
>> Could you have a look ?
>
> So, I also did a test build here, and it indeed fails for me too. At
> first glance, our mksquashfs has support for extended attributes:
>
> $ ./tests/TestFileCapabilities/host/bin/mksquashfs -h
> [...]
> -no-xattrs don't store extended attributes
> -xattrs store extended attributes (default)
> [...]
>
> Further investigation postponed, for cause of a visitor... ;-]
It looks like the problem occurs when extracting a tarfile with xattrs inside
fakeroot. See the commands I used in [1]. Unfortunately I don't know how to fix
this.
The same test case works fine on the 2018.02.x branch, see [2].
[1] https://bugs.busybox.net/show_bug.cgi?id=11216
[2] https://gitlab.com/buildroot.org/buildroot/-/jobs/107232219
Regards,
Ricardo
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] TestFileCapabilities is broken
2018-10-14 14:47 ` Ricardo Martincoski
@ 2018-10-21 9:17 ` Yann E. MORIN
0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2018-10-21 9:17 UTC (permalink / raw)
To: buildroot
Ricardo, All,
On 2018-10-14 11:47 -0300, Ricardo Martincoski spake thusly:
> On Sun, Oct 14, 2018 at 11:26 AM, Yann E. MORIN wrote:
>
> > On 2018-10-14 15:25 +0200, Thomas Petazzoni spake thusly:
> >> The TestFileCapabilities test of our test suite is failing, with:
> >>
> >> ======================================================================
> >> FAIL: test_run (tests.core.test_file_capabilities.TestFileCapabilities)
> >> ----------------------------------------------------------------------
> >> Traceback (most recent call last):
> >> File "/builds/buildroot.org/buildroot/support/testing/tests/core/test_file_capabilities.py", line 44, in test_run
> >> self.assertIn("cap_kill", output[0])
> >> AssertionError: 'cap_kill' not found in '/usr/sbin/getcap'
> >>
> >> I did a local build, and I can reproduce the issue. What we do is we
> >> run "getcap -v /usr/sbin/getcap" on the target, and it returns just:
> >>
> >> # getcap -v /usr/sbin/getcap
> >> /usr/sbin/getcap
> >>
> >> And not any of the extended attributes that getcap is supposed to have.
> >> I had a quick look, and makedevs gets run with a correct device table
> >> when generating the common tarball. I don't know when extended
> >> attributes are lost.
>
> This is bug #11216
Thanks! With all the information you collected in there, I was able to
come up with a fix (workaround?) which makes the TestFileCapabilities
test-case pass with success.
I'm still doing a few tests here, mostly to come up with a good commit
log, and I should post a patchset by the end of the day.
Regards,
Yann E. MORIN.
> >>
> >> Could you have a look ?
> >
> > So, I also did a test build here, and it indeed fails for me too. At
> > first glance, our mksquashfs has support for extended attributes:
> >
> > $ ./tests/TestFileCapabilities/host/bin/mksquashfs -h
> > [...]
> > -no-xattrs don't store extended attributes
> > -xattrs store extended attributes (default)
> > [...]
> >
> > Further investigation postponed, for cause of a visitor... ;-]
>
> It looks like the problem occurs when extracting a tarfile with xattrs inside
> fakeroot. See the commands I used in [1]. Unfortunately I don't know how to fix
> this.
>
> The same test case works fine on the 2018.02.x branch, see [2].
>
> [1] https://bugs.busybox.net/show_bug.cgi?id=11216
> [2] https://gitlab.com/buildroot.org/buildroot/-/jobs/107232219
>
> Regards,
> Ricardo
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-21 9:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-14 13:25 [Buildroot] TestFileCapabilities is broken Thomas Petazzoni
2018-10-14 14:26 ` Yann E. MORIN
2018-10-14 14:47 ` Ricardo Martincoski
2018-10-21 9:17 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox