[LTP] [PATCH v6 1/3] Refactor regen.sh script to generate syscalls
Petr Vorel
pvorel@suse.cz
Thu Oct 31 12:17:15 CET 2024
> Hi!
> > I was comparing the old include/lapi/syscalls.h (21579 lines) and the new one
> > (20054). Having new file shorter is a bit surprising to me. I haven't found what
> > is missing, probably I'm missing something myself :).
> That is strange, I got exactly same content minus some whitespaces and
> slightly different macros that check for arch support:
Hm, that must be on my side than. I was doing that on old version,
but even with update to the current master and deleting all:
rm -rf *; git reset --hard; make autotools && ./configure
I still get:
21579 for master (84e77afb3a)
20054 for v6.
Because diff is big, I posted: diff [1], old master [2], new v6 [3]
Now I see the reason - what I pushed as Anrea's v6 [4] is broken for many
distros [5].
Reason for the failure itself is quite obvious [6]:
414 ../include/lapi/syscalls.h:13:2: error: unterminated conditional directive
415 #ifndef LAPI_SYSCALLS_H__
416 ^
417 1 error generated.
Looking it's broken on Debian any version I suspect
include/lapi/syscalls/generate_syscalls.sh works differently on dash.
But it works on ash. Maybe it's not a shell syntax but some dependency.
I suppose include/lapi/syscalls/generate_syscalls.sh should use:
#!/bin/sh -eux
instead of plain #!/bin/sh, that will show the error immediately.
(set -eu is useful for shell scripts which should not fail).
Kind regards,
Petr
[1] https://github.com/pevik/ltp/wiki/diff-master-and-v6
[2] https://github.com/pevik/ltp/wiki/syscalls.h-old-master-(84e77afb3a)
[3] https://github.com/pevik/ltp/wiki/syscalls.h-v6-(new)
[4] https://github.com/pevik/ltp/tree/refs/heads/andrea/automatically-generate-syscalls.h.v6
[5] https://github.com/pevik/ltp/actions/runs/11609439723
[6] https://github.com/pevik/ltp/actions/runs/11609439723/job/32326686364
More information about the ltp
mailing list