Skip to content

Conversation

@Ioa1
Copy link
Contributor

@Ioa1 Ioa1 commented Aug 11, 2025

Added support for fifos and sockets for try. Added test cases in all-commit-cases.sh for fifos and sockets as well. Added make-socket.c for all-commit-cases.sh.

Copy link
Contributor

@mgree mgree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nearly there! A few nits, but mostly just the test fix and the find_upperdir_changes/process_changes fix.

Vagrantfile Outdated
sudo modprobe overlay
cd try
autoconf && ./configure --disable-utils
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everywhere else, this is ... && make. Make it the same?

AUTO_CFLAGS=""
fi
AUTO_CPPFLAGS=""
AUTO_CPPFLAGS=""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go now, since we've set it unconditionally above.

configure.ac Outdated
if test -z "$CFLAGS"
then
AUTO_CFLAGS="-g -Wall -O2"
AUTO_CPPFLAGS="-g -Wall -O2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not sensible C preprocessor flags. We want to set AUTO_CPPFLAGS to "" unconditionally.

AUTO_CPPFLAGS=""
AUTO_CPPFLAGS=""

CFLAGS=${CFLAGS-"$AUTO_CFLAGS"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines need to be moved up, so that we're actually setting CFLAGS and CPPFLAGS!


cleanup() {
cd /
cd /
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file has been reformatted... can you fix it so it's only the real diff? 🥲


: $((COUNT += 1))

! [ -e newsock ] || fail
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not test the declared case.


: $((COUNT += 1))

! [ -e newsock ] || fail
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not test the declared case.

try Outdated

find "$sandbox_dir/upperdir/" -type f -o \( -type c -size 0 \) -o -type d -o -type l | ignore_changes "$ignore_file"
}
find "$sandbox_dir/upperdir/" \( -type f -o -type c -size 0 -o -type d -o -type l -o -type s -o -type p \) | ignore_changes "$ignore_file"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we filtering by type at all, at this point? This list omits only -b and non-empty -c... both of which are mistakes, I think. Since we can handle any type of file, we don't need to filter in the find at all... right?

try Outdated
continue
fi

elif [ -p "$changed_file" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mis-indented, should be two back.

try Outdated

elif [ -p "$changed_file" ]
then
if [ -e "$local_file" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the logic for this case seems basically identical to the logic for regular files below... merge the branches?

Copy link
Contributor

@mgree mgree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more nits.

Vagrantfile Outdated
sudo modprobe overlay
cd try
autoconf && ./configure --disable-utils && make
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this happen twice?

test/explore.sh Outdated
set timeout 3
spawn "$TRY" explore
send -- "PS1='# '\r"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably not be here? Feels like rebase noise.

try Outdated
find "$sandbox_dir/upperdir/" -type f -o \( -type c -size 0 \) -o -type d -o -type l | ignore_changes "$ignore_file"
}
find "$sandbox_dir/upperdir/" | ignore_changes "$ignore_file"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ws change

try Outdated
## NB $mountpoint is the local directory to mount
## $merger_dir is where we'll put its merger
"$UNION_HELPER" "$mountpoint" "$merger_dir" 2>>"$try_mount_log" ||
"$UNION_HELPER" $mountpoint $merger_dir 2>>"$try_mount_log" ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the comment?

try Outdated
fi

# must be a directory, but not opaque---leave it!
# must be a directory, but not opaque---leave it!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ws change

break;

case FTS_DEFAULT:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two cases can be collapsed, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants