Skip to content

Commit

Permalink
TEMPORARY(?) instrumentation for unlinkat-ebusy
Browse files Browse the repository at this point in the history
Instrument system tests in hopes of tracking down containers#17216,
the unlinkat-ebusy-hosed flake.

Oh, also, timestamp.awk: timestamps have always been UTC, but
add a 'Z' to make it unambiguous.

Signed-off-by: Ed Santiago <[email protected]>
  • Loading branch information
edsantiago committed May 22, 2023
1 parent b155106 commit 94c65a6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contrib/cirrus/timestamp.awk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
BEGIN {
STARTTIME=systime()
printf "[%s] START", strftime("%T")
printf " - All [+xxxx] lines that follow are relative to %s.\n", strftime("%FT%T")
printf " - All [+xxxx] lines that follow are relative to %s.\n", strftime("%FT%TZ", systime(), 1)
}

{
Expand All @@ -16,5 +16,5 @@ BEGIN {

END {
printf "[%s] END", strftime("%T")
printf " - [%+05ds] total duration since %s\n", systime()-STARTTIME, strftime("%FT%T")
printf " - [%+05ds] total duration since %s\n", systime()-STARTTIME, strftime("%FT%TZ", systime(), 1)
}
24 changes: 23 additions & 1 deletion test/system/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ fi

# Setup helper: establish a test environment with exactly the images needed
function basic_setup() {
# FIXME FIXME FIXME: remove if #17216 is fixed. See below also.
if [[ -e "${BATS_SUITE_TMPDIR}/forget-it" ]]; then
skip "everything is hosed, no point in going on"
fi

# Clean up all containers
run_podman rm -t 0 --all --force --ignore

Expand All @@ -58,7 +63,24 @@ function basic_setup() {

# Clean up all images except those desired
found_needed_image=
run_podman images --all --format '{{.Repository}}:{{.Tag}} {{.ID}}'
run_podman '?' images --all --format '{{.Repository}}:{{.Tag}} {{.ID}}'
# FIXME FIXME FIXME: temporary hack for #17216. If we see the unlinkat-busy
# flake, nothing will ever work again.
if [[ $status -ne 0 ]]; then
if [[ "$output" =~ unlinkat.*busy ]]; then
# Signal (see above) to skip all subsequent tests.
touch "${BATS_SUITE_TMPDIR}/forget-it"
# Gather some debugging info, then fail
echo "$_LOG_PROMPT ps auxww --forest"
ps auxww --forest
echo "$_LOG_PROMPT mount"
mount
echo "$_LOG_PROMPT lsof /var/lib/containers"
lsof /var/lib/containers
false
fi
fi

for line in "${lines[@]}"; do
set $line
if [[ "$1" == "$PODMAN_TEST_IMAGE_FQN" ]]; then
Expand Down

0 comments on commit 94c65a6

Please sign in to comment.