pgo: run xtgettcap without any arguments

We execute xtgettcap in the parent terminal. Thus we don’t know if it
implements XTGETTCAP, and thus it’s not guaranteed to exit - it may
hang indefinitely waiting for a reply.

Fix by not actually quering anything.
This commit is contained in:
Daniel Eklöf 2022-10-10 17:18:04 +02:00
parent 807e193854
commit a9fc7ce180
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 5 additions and 5 deletions

View file

@ -327,7 +327,7 @@ We will use the `pgo` binary along with input corpus generated by
`scripts/generate-alt-random-writes.py`: `scripts/generate-alt-random-writes.py`:
```sh ```sh
./utils/xtgettcap name ./utils/xtgettcap
./footclient --version ./footclient --version
./foot --version ./foot --version
tmp_file=$(mktemp) tmp_file=$(mktemp)
@ -373,7 +373,7 @@ This method requires a running Wayland session.
We will use the script `scripts/generate-alt-random-writes.py`: We will use the script `scripts/generate-alt-random-writes.py`:
```sh ```sh
./utils/xtgettcap name ./utils/xtgettcap
./footclient --version ./footclient --version
foot_tmp_file=$(mktemp) foot_tmp_file=$(mktemp)
./foot \ ./foot \
@ -387,7 +387,7 @@ rm ${foot_tmp_file}
You should see a foot window open up, with random colored text. The You should see a foot window open up, with random colored text. The
window should close after ~1-2s. window should close after ~1-2s.
The first step, `./utils/xtgettcap name && ./footclient --version` The first step, `./utils/xtgettcap && ./footclient --version`
might seem unnecessary, but is needed to ensure we have _some_ might seem unnecessary, but is needed to ensure we have _some_
profiling data for **all** binaries we build. Without this, the final profiling data for **all** binaries we build. Without this, the final
link phase will fail. link phase will fail.

View file

@ -15,7 +15,7 @@ rm -f "${blddir}"/pgo-ok
# To ensure profiling data is generated in the build directory # To ensure profiling data is generated in the build directory
cd "${blddir}" cd "${blddir}"
"${blddir}"/utils/xtgettcap name "${blddir}"/utils/xtgettcap
"${blddir}"/footclient --version "${blddir}"/footclient --version
"${blddir}"/foot \ "${blddir}"/foot \
--config=/dev/null \ --config=/dev/null \

View file

@ -21,7 +21,7 @@ rm -f "${blddir}"/pgo-ok
# To ensure profiling data is generated in the build directory # To ensure profiling data is generated in the build directory
cd "${blddir}" cd "${blddir}"
"${blddir}"/utils/xtgettcap name "${blddir}"/utils/xtgettcap
"${blddir}"/footclient --version "${blddir}"/footclient --version
"${blddir}"/foot --version "${blddir}"/foot --version
"${blddir}"/pgo "${pgo_data}" "${blddir}"/pgo "${pgo_data}"