public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH v2 1/2] Add 'make check' and clang-check to build system
Date: Fri, 4 Jun 2021 16:10:36 +0200	[thread overview]
Message-ID: <YLo0XKY9b+S2ROQQ@pevik> (raw)
In-Reply-To: <20210604111434.21422-2-rpalethorpe@suse.com>

Hi Richie,

> Allows the user to run 'make check' to check all source files or
> 'make check-<target>' to check one source file corresponding to a
> target.

> Adds makefile pieces for tools/clang-check/main which will be a
> libclang based tool. By default this is ran by 'make check'.

I haven't looked at Coccinelle, but this LGTM.

But, it still fails to compile:

$ make autotools && ./configure && cd testcases/kernel/syscalls/chown/
$ make clean; make

make -C "/home/pvorel/install/src/ltp.git/lib" -f "/src/ltp/lib/Makefile" all
make[1]: Entering directory '/src/ltp/lib'
make[2]: Nothing to be done for 'all'.
make[2]: Nothing to be done for 'all'.
make[1]: Leaving directory '/src/ltp/lib'
CC testcases/kernel/syscalls/chown/chown01.o
LD testcases/kernel/syscalls/chown/chown01
CC testcases/kernel/syscalls/chown/chown02.o
LD testcases/kernel/syscalls/chown/chown02
CC testcases/kernel/syscalls/chown/chown03.o
LD testcases/kernel/syscalls/chown/chown03
CC testcases/kernel/syscalls/chown/chown04.o
LD testcases/kernel/syscalls/chown/chown04
CC testcases/kernel/syscalls/chown/chown05.o
LD testcases/kernel/syscalls/chown/chown05
make: *** No rule to make target 'chown01_16.c', needed by 'chown01_16'.  Stop.
rm chown01.o chown03.o chown02.o chown05.o chown04.o

This is a newly introduced failure caused by some change in include/mk/ in this
commit.

Could we have also make check in the top level Makefile?

$ make check
make: *** No rule to make target 'check'.  Stop.

$ cd lib && make check
CHECK lib/cloner.c
CHECK lib/get_path.c
CHECK lib/parse_opts.c
CHECK lib/random_range.c
CHECK lib/safe_file_ops.c
CHECK lib/safe_macros.c
CHECK lib/safe_net.c
CHECK lib/safe_pthread.c
CHECK lib/safe_stdio.c
CHECK lib/self_exec.c
CHECK lib/tlibio.c
tst_af_alg.c:16:2: CHECK ERROR: TEST() macro should not be used in library
tst_af_alg.c:27:2: CHECK ERROR: TEST() macro should not be used in library
tst_af_alg.c:74:2: CHECK ERROR: TEST() macro should not be used in library
tst_af_alg.c:109:2: CHECK ERROR: TEST() macro should not be used in library
tst_af_alg.c:119:2: CHECK ERROR: TEST() macro should not be used in library
make: *** [../include/mk/rules.mk:46: check-tst_af_alg] Error 1

Similarly what I added to my patchset which also adds new make target:
https://patchwork.ozlabs.org/project/ltp/patch/20210603183827.24339-2-pvorel@suse.cz/
Although my code has duplicate issue:
../include/mk/generic_trunk_target.inc:105: warning: overriding recipe for target 'check-c'
../include/mk/generic_leaf_target.inc:110: warning: ignoring old recipe for target 'check-c'
../include/mk/generic_trunk_target.inc:105: warning: overriding recipe for target 'check-shell'
../include/mk/generic_leaf_target.inc:118: warning: ignoring old recipe for target 'check-shell'

Also make check on regular test expect it's a library. IMHO these two must be
probably separated:

$ cd testcases/kernel/syscalls/fchown/ && make check
CHECK testcases/kernel/syscalls/fchown/fchown01.c
CHECK testcases/kernel/syscalls/fchown/fchown02.c
CHECK testcases/kernel/syscalls/fchown/fchown03.c
CHECK testcases/kernel/syscalls/fchown/fchown04.c
fchown05.c:80:4: CHECK ERROR: TEST() macro should not be used in library
make: *** [../../../../include/mk/rules.mk:46: check-fchown05] Error 1

Kind regards,
Petr

  reply	other threads:[~2021-06-04 14:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 11:14 [LTP] [RFC PATCH v2 0/2] Libclang based analyzer Richard Palethorpe
2021-06-04 11:14 ` [LTP] [RFC PATCH v2 1/2] Add 'make check' and clang-check to build system Richard Palethorpe
2021-06-04 14:10   ` Petr Vorel [this message]
2021-06-04 14:11     ` Cyril Hrubis
2021-06-04 14:28     ` Richard Palethorpe
2021-06-04 14:33       ` Cyril Hrubis
2021-06-07  9:18   ` Joerg Vehlow
2021-06-07  9:12     ` Cyril Hrubis
2021-06-11 13:49   ` Petr Vorel
2021-06-11 14:17     ` Petr Vorel
2021-06-14 11:09       ` Richard Palethorpe
2021-06-04 11:14 ` [LTP] [RFC PATCH v2 2/2] Start libclang based analyzer and TEST() check Richard Palethorpe
2021-06-04 12:52 ` [LTP] [RFC PATCH v2 0/2] Libclang based analyzer Cyril Hrubis
2021-06-04 13:50   ` Richard Palethorpe
2021-06-07  8:37 ` Joerg Vehlow
2021-06-07  9:14   ` Cyril Hrubis
2021-06-07 10:20   ` Richard Palethorpe
2021-06-07 11:34     ` Joerg Vehlow
2021-06-07 13:42       ` Cyril Hrubis
2021-06-07 13:49       ` Richard Palethorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YLo0XKY9b+S2ROQQ@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox