Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LTP: fix linux testcases build error on vela #1

Merged

Conversation

extinguish
Copy link
Contributor

  1. tst_test.h: fix the kernel/tst_test.h "char **av" variable undeclared build error
  2. syscall/ipcsem: fix the function prototype declartion mismatch error
  3. asprintf: make the compilation of asprintf function controllable
  4. pipe02: fix the header file missing build error
  5. reiser_fract_tree.c: fix the long string print error
  6. add the missing header file
  7. syscall: remove the duplicate poll.h to fix link error

the "av[0]" variable are not declared inside pipe02.c, add "char **av"
inside tst_test.h to fix the build error
the detailed build error:
ltp/testcases/kernel/syscalls/pipe/pipe02.c:57:31: error: 'av' undeclared (first use in this function)
   57 |                 if (self_exec(av[0], "dd", fd[0], fd[1]) < 0)
      |                               ^~

Signed-off-by: guoshichao <[email protected]>
the asprintf function implementation may be defined in some platform,
for example, NuttX has provided the asprintf function already.
so in order to build on other platform, we should make the compilation
of asprintf controllable, just like other controllerable function, for
example: HAVE_READLINKAT, HAVE_TIMERFD_CREATE .etc

Signed-off-by: guoshichao <[email protected]>
add <sys/wait.h> header file to fix the link error

Signed-off-by: guoshichao <[email protected]>
this `poll.h` file is located at `testcases/kernel/syscalls/utils`
directory. Since we need to export the `testcases/kernel/syscalls/utils`
path as the reference directory for header files, so when we use
`#include <poll.h>` anywhere in the entire system, it will give priority
to referencing the `testcases/kernel/syscalls/utils/poll.h` instead of
the `<poll.h>` in the current system. As a result, this will lead to
some compilation errors.

In addition, some of the contents defined in `testcases/kernel/syscalls/utils/poll.h`
also conflicts with those defined in the system's `<poll.h>`.
For example, the definition of `struct pollfd {}` is in conflict.
Therefore, we can't solve the error of duplicate definition of `struct pollfd {}`
just by using `#include_next <poll.h>` directly in `testcases/kernel/syscalls/utils/poll.h`.

Signed-off-by: guoshichao <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Dec 24, 2024

CLA assistant check
All committers have signed the CLA.

@xiaoxiang781216 xiaoxiang781216 merged commit 92c7d59 into open-vela:dev Dec 26, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants