No description
Find a file
Athira Rajeev f194210846 perf test buildid: Fix shell string substitutions
The perf test named “build id cache operations” skips with below error
on some distros:

  <<>>
   78: build id cache operations                                       :
  test child forked, pid 111101
  WARNING: wine not found. PE binaries will not be run.
  test binaries: /tmp/perf.ex.SHA1.PKz /tmp/perf.ex.MD5.Gt3 ./tests/shell/../pe-file.exe
  DEBUGINFOD_URLS=
  Adding 4abd406f041feb4f10ecde3fc30fd0639e1a91cb /tmp/perf.ex.SHA1.PKz: Ok
  build id: 4abd406f041feb4f10ecde3fc30fd0639e1a91cb
  ./tests/shell/buildid.sh: 69: ./tests/shell/buildid.sh: Bad substitution
  test child finished with -2
  build id cache operations: Skip
  <<>>

The test script "tests/shell/buildid.sh" uses some of the string
substitution ways which are supported in bash, but not in "sh" or other
shells. Above error on line number 69 that reports "Bad substitution"
is:

  <<>>
  link=${build_id_dir}/.build-id/${id:0:2}/${id:2}
  <<>>

Here the way of getting first two characters from id ie, ${id:0:2} and
similarly expressions like ${id:2} is not recognised in "sh". So the
line errors and instead of hitting failure, the test gets skipped as
shown in logs.  So the syntax issue causes test not to be executed in
such cases. Similarly usage : "${@: -1}" [ to pick last argument passed
to a function] in “test_record” doesn’t work in all distros.

Fix this by using alternative way with shell substitution to pick
required characters from the string. Also fix the usage of “${@: -1}” to
work in all cases.

Another usage in “test_record” is:

  <<>>
  ${perf} record --buildid-all -o ${data} $@ &> ${log}
  <<>>

This causes the 'perf record' to start in background and Results in the
data file not being created by the time "check" function is invoked.
Below log shows 'perf record' result getting displayed after the call to
"check" function.

  <<>>
  running: perf record /tmp/perf.ex.SHA1.EAU
  build id: 4abd406f041feb4f10ecde3fc30fd0639e1a91cb
  link: /tmp/perf.debug.mLT/.build-id/4a/bd406f041feb4f10ecde3fc30fd0639e1a91cb
  failed: link /tmp/perf.debug.mLT/.build-id/4a/bd406f041feb4f10ecde3fc30fd0639e1a91cb does not exist
  test child finished with -1
  build id cache operations: FAILED!
  root@machine:~/athira/linux/tools/perf# Couldn't synthesize bpf events.
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.010 MB /tmp/perf.data.bFF ]
  <<>>

Fix this by redirecting output instead of using “&” which starts the
command in background.

Reviewed-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Tested-by: Disha Goel <disgoel@linux.ibm.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230119142719.32628-1-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-01-23 10:03:07 -03:00
arch - Make sure the scheduler doesn't use stale frequency scaling values when latter 2023-01-22 12:14:58 -08:00
block block-6.2-2023-01-20 2023-01-20 12:44:41 -08:00
certs certs: make system keyring depend on built-in x509 parser 2022-09-24 04:31:18 +09:00
crypto This update includes the following changes: 2022-12-14 12:31:09 -08:00
Documentation Char/Misc driver fixes for 6.2-rc5 2023-01-21 11:20:55 -08:00
drivers - Respect user-supplied polling value in the EDAC device code 2023-01-22 12:10:47 -08:00
fs gfs2 writepage fix 2023-01-22 11:56:33 -08:00
include USB / Thunderbolt fixes for 6.2-rc5 2023-01-21 11:10:03 -08:00
init Kbuild fixes for v6.2 (3rd) 2023-01-21 10:56:37 -08:00
io_uring io_uring/poll: don't reissue in case of poll race on multishot request 2023-01-20 15:11:54 -07:00
ipc Non-MM patches for 6.2-rc1. 2022-12-12 17:28:58 -08:00
kernel - Make sure the scheduler doesn't use stale frequency scaling values when latter 2023-01-22 12:14:58 -08:00
lib v6.2 second rc pull request 2023-01-20 14:15:51 -08:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
mm slab fixes for 6.2-rc5 2023-01-19 12:24:39 -08:00
net tcp: fix rate_app_limited to default to 1 2023-01-20 13:23:35 +00:00
rust rust: types: add Opaque type 2022-12-04 01:59:16 +01:00
samples Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
scripts Kbuild fixes for v6.2 (3rd) 2023-01-21 10:56:37 -08:00
security tomoyo: Update website link 2023-01-13 23:11:38 +09:00
sound sound fixes for 6.2-rc4 2023-01-13 08:20:29 -06:00
tools perf test buildid: Fix shell string substitutions 2023-01-23 10:03:07 -03:00
usr usr/gen_init_cpio.c: remove unnecessary -1 values from int file 2022-10-03 14:21:44 -07:00
virt KVM: Ensure lockdep knows about kvm->lock vs. vcpu->mutex ordering rule 2023-01-11 13:32:21 -05:00
.clang-format iommufd for 6.2 2022-12-14 09:15:43 -08:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: ignore *.rpm 2022-12-30 17:22:14 +09:00
.mailmap 21 hotfixes. Thirteen of these address pre-6.1 issues and hence have 2023-01-16 16:36:39 -08:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: zram: zsmalloc: Add an additional co-maintainer 2022-12-15 16:37:49 -08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS ACPI fixes for 6.2-rc5 2023-01-20 11:11:35 -08:00
Makefile Linux 6.2-rc5 2023-01-21 16:27:01 -08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.