tsc test failed to build

Bug #1831584 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Sultan Alsawaf

Bug Description

Test compilation failed with:
  * Command:
      make
  Exit status: 2
  Duration: 0.0521910190582

  stdout:
  cc -O -c -o checktsc.o checktsc.c
  <builtin>: recipe for target 'checktsc.o' failed
  stderr:
  In file included from checktsc.c:11:0:
  sched.h:23:3: error: conflicting types for ‘cpu_set_t’
   } cpu_set_t;
     ^~~~~~~~~
  In file included from /usr/include/sched.h:44:0,
                   from /usr/include/pthread.h:23,
                   from checktsc.c:9:
  /usr/include/x86_64-linux-gnu/bits/cpu-set.h:42:3: note: previous declaration of ‘cpu_set_t’ was here
   } cpu_set_t;
     ^~~~~~~~~
  In file included from checktsc.c:11:0:
  sched.h:42:0: warning: "CPU_SET" redefined
   #define CPU_SET(cpu, cpusetp) __CPU_SET (cpu, cpusetp)

  In file included from /usr/include/pthread.h:23:0,
                   from checktsc.c:9:
  /usr/include/sched.h:83:0: note: this is the location of the previous definition
   # define CPU_SET(cpu, cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp)

  In file included from checktsc.c:11:0:
  sched.h:43:0: warning: "CPU_CLR" redefined
   #define CPU_CLR(cpu, cpusetp) __CPU_CLR (cpu, cpusetp)

  In file included from /usr/include/pthread.h:23:0,
                   from checktsc.c:9:
  /usr/include/sched.h:84:0: note: this is the location of the previous definition
   # define CPU_CLR(cpu, cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp)

  In file included from checktsc.c:11:0:
  sched.h:44:0: warning: "CPU_ISSET" redefined
   #define CPU_ISSET(cpu, cpusetp) __CPU_ISSET (cpu, cpusetp)

  In file included from /usr/include/pthread.h:23:0,
                   from checktsc.c:9:
  /usr/include/sched.h:85:0: note: this is the location of the previous definition
   # define CPU_ISSET(cpu, cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), \

  In file included from checktsc.c:11:0:
  sched.h:45:0: warning: "CPU_ZERO" redefined
   #define CPU_ZERO(cpusetp) __CPU_ZERO (cpusetp)

  In file included from /usr/include/pthread.h:23:0,
                   from checktsc.c:9:
  /usr/include/sched.h:87:0: note: this is the location of the previous definition
   # define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp)

  checktsc.c: In function ‘set_cpu_affinity’:
  checktsc.c:183:40: warning: passing argument 3 of ‘sched_setaffinity’ from incompatible pointer type [-Wincompatible-pointer-types]
    if (sched_setaffinity(0, sizeof cpus, &cpus) < 0) {
                                          ^
  In file included from /usr/include/pthread.h:23:0,
                   from checktsc.c:9:
  /usr/include/sched.h:121:12: note: expected ‘const cpu_set_t * {aka const struct <anonymous> *}’ but argument is of type ‘cpu_set_t * {aka struct <anonymous> *}’
   extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
              ^~~~~~~~~~~~~~~~~
  checktsc.c: In function ‘tsc_delta’:
  checktsc.c:227:37: warning: format ‘%Ld’ expects argument of type ‘long long int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
      printf("loop %2d: roundtrip = %5Ld\n", i, t1 - t0);
                                    ~~~^ ~~~~~~~
                                    %5ld
  checktsc.c:233:33: warning: format ‘%Ld’ expects argument of type ‘long long int’, but argument 4 has type ‘int64_t {aka long int}’ [-Wformat=]
     printf("CPU %d - CPU %d = % 5Ld\n", cpu_a, cpu_b, delta);
                               ~~~~^
                               % 5ld
  checktsc.c: In function ‘main’:
  checktsc.c:372:36: warning: passing argument 3 of ‘sched_setaffinity’ from incompatible pointer type [-Wincompatible-pointer-types]
    sched_setaffinity(0, sizeof cpus, &cpus);
                                      ^
  In file included from /usr/include/pthread.h:23:0,
                   from checktsc.c:9:
  /usr/include/sched.h:121:12: note: expected ‘const cpu_set_t * {aka const struct <anonymous> *}’ but argument is of type ‘cpu_set_t * {aka struct <anonymous> *}’
   extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
              ^~~~~~~~~~~~~~~~~
  checktsc.c:373:40: warning: passing argument 3 of ‘sched_getaffinity’ from incompatible pointer type [-Wincompatible-pointer-types]
    if (sched_getaffinity(0, sizeof cpus, &cpus) < 0) {
                                          ^
  In file included from /usr/include/pthread.h:23:0,
                   from checktsc.c:9:
  /usr/include/sched.h:125:12: note: expected ‘cpu_set_t * {aka struct <anonymous> *}’ but argument is of type ‘cpu_set_t * {aka struct <anonymous> *}’
   extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
              ^~~~~~~~~~~~~~~~~
  make: *** [checktsc.o] Error 1

Po-Hsu Lin (cypressyew)
tags: added: tsc
Revision history for this message
Sean Feole (sfeole) wrote :

TSC is failing to build on EOAN-5.2.0-4.5-generic full log attached

06/12 18:30:34 ERROR| utils:0153| [stderr] ~~~~~~~~~~~~~~~~~^~~~~~~~
06/12 18:30:34 ERROR| utils:0153| [stderr] checktsc.c:373:40: warning: passing argument 3 of ‘sched_getaffinity’ from incompatible pointer type [-Wincompatible-pointer-types]
06/12 18:30:34 ERROR| utils:0153| [stderr] if (sched_getaffinity(0, sizeof cpus, &cpus) < 0) {
06/12 18:30:34 ERROR| utils:0153| [stderr] ^~~~~
06/12 18:30:34 ERROR| utils:0153| [stderr] In file included from /usr/include/pthread.h:23,
06/12 18:30:34 ERROR| utils:0153| [stderr] from checktsc.c:9:
06/12 18:30:34 ERROR| utils:0153| [stderr] /usr/include/sched.h:126:21: note: expected ‘cpu_set_t *’ {aka ‘struct <anonymous> *’} but argument is of type ‘cpu_set_t *’ {aka ‘struct <anonymous> *’}
06/12 18:30:34 ERROR| utils:0153| [stderr] cpu_set_t *__cpuset) __THROW;
06/12 18:30:34 ERROR| utils:0153| [stderr] ~~~~~~~~~~~^~~~~~~~
06/12 18:30:34 ERROR| utils:0153| [stderr] make: *** [<builtin>: checktsc.o] Error 1
06/12 18:30:34 ERROR| test:0414| Exception escaping from test:
Traceback (most recent call last):
  File "/home/ubuntu/autotest/client/shared/test.py", line 387, in _exec
    *p_args, **p_dargs)
  File "/home/ubuntu/autotest/client/shared/utils.py", line 865, in update_version
    install(*args, **dargs)
  File "/home/ubuntu/autotest/client/tests/tsc/tsc.py", line 18, in setup
    utils.make()
  File "/home/ubuntu/autotest/client/shared/utils.py", line 2056, in make
    return system(cmd, timeout=timeout, ignore_status=ignore_status)
  File "/home/ubuntu/autotest/client/shared/utils.py", line 1232, in system
    verbose=verbose).exit_status
  File "/home/ubuntu/autotest/client/shared/utils.py", line 918, in run
    "Command returned non-zero exit status")
CmdError: Command <make > failed, rc=2, Command returned non-zero exit status
* Command:
    make
Exit status: 2

Changed in ubuntu-kernel-tests:
status: New → Confirmed
Sean Feole (sfeole)
tags: added: amd64 eoan linux-generic sru-20190603
Sean Feole (sfeole)
tags: added: arm64
Sean Feole (sfeole)
tags: added: sru-20190701
tags: added: aws disco
Sean Feole (sfeole)
tags: added: gcp
Sean Feole (sfeole)
tags: added: azure
tags: added: sru-20190722
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Changed in ubuntu-kernel-tests:
assignee: nobody → Sultan Alsawaf (kerneltoast)
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.