[Pkg-sssd-devel] Bug#1086769: uid-wrapper FTBFS on hppa, powerpc and x32

Simon Josefsson simon at josefsson.org
Wed Nov 6 08:26:07 GMT 2024


Hi.  The uid-wrapper autopkgtest fails on armel and armhf:

https://tracker.debian.org/pkg/uid-wrapper
https://ci.debian.net/packages/u/uid-wrapper/testing/armel/54125843/
https://ci.debian.net/packages/u/uid-wrapper/testing/armhf/54125865/

The C flags are hidden, and I am working on unhiding them via
-DCMAKE_VERBOSE_MAKEFILE=ON but it doesn't look like the self-tests are
built with -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64, unless that comes
from config.h: https://salsa.debian.org/jas/uid-wrapper/-/jobs/6543041

The failing code here is uid-wrapper/tests/test_syscall.c line 53:

	assert_int_equal(tv1.tv_sec, tv2.tv_sec);

Maybe the previous arm32 patch is still relevant?

Reading that self-test makes me wonder if it really support
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64.  The code is low-level so
shouldn't it have internal magic for the 32-bit vs 64-bit case?

I also wonder what relevance that particular self-test has with
uid-wrapper generally: the self test checks gettimeofday vs
SYS_gettimeofday, but uid-wrapper never does anything related to
gettimeofday.  As discussed in
https://gitlab.com/cwrap/uid_wrapper/-/issues/1 one fix would be to use
a SYS_gettimeofday64 call instead, but that doesn't seem to exist.
Maybe the purpose of this self-test is to merely test the syscall
facility, and that they happened to pick gettimeofday which used to be
an uncomplicated interface but lately haven't been?

Thoughts?  Maybe just add back Draw's patch?

The entire code is fairly simple, simplified:

static void test_uwrap_syscall(void **state)
{
	long int rc;
	struct timeval tv1, tv2;
	struct timezone tz1, tz2;

	(void) state; /* unused */

	rc = syscall(SYS_getpid);
	assert_int_equal(rc, getpid());

	ZERO_STRUCT(tv1);
	ZERO_STRUCT(tv2);
	ZERO_STRUCT(tz1);
	ZERO_STRUCT(tz2);

	rc = gettimeofday(&tv1, &tz1);
	assert_int_equal(rc, 0);

	rc = syscall(SYS_gettimeofday, &tv2, &tz2);
	assert_int_equal(rc, 0);
	assert_int_equal(tz1.tz_dsttime, tz2.tz_dsttime);
	assert_int_equal(tz1.tz_minuteswest, tz2.tz_minuteswest);

	assert_int_equal(tv1.tv_sec, tv2.tv_sec);
}

/Simon

105s 15/33 Test #15: test_syscall .....................***Failed    0.00 sec
105s [==========] uwrap_tests: Running 1 test(s).
105s [ RUN      ] test_uwrap_syscall
105s [  ERROR   ] --- 0x672a9fe1 != 0xf2839672a9fe1
105s [   LINE   ] --- /tmp/autopkgtest-lxc._gpjzze_/downtmp/autopkgtest_tmp/tests/test_syscall.c:53: error: Failure!
105s [  FAILED  ] test_uwrap_syscall
105s [==========] uwrap_tests: 1 test(s) run.
105s [  PASSED  ] 0 test(s).
105s [  FAILED  ] uwrap_tests: 1 test(s), listed below:
105s [  FAILED  ] test_uwrap_syscall
105s 
105s  1 FAILED TEST(S)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 255 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-sssd-devel/attachments/20241106/99f64cb2/attachment.sig>


More information about the Pkg-sssd-devel mailing list