Skip to content

cp, nfs-removal-race.sh? : strace -P d -e inject=%stat:retval=0 -e inject=openat:error=ENOENT:when=1 cp s d fails #9882

Closed

Description

@oech3
$ touch s
$ strace -P d -e inject=%stat:retval=0 -e inject=openat:error=ENOENT:when=1 cp s d 2> /dev/null
$ file d
d: cannot open `d' (No such file or directory)
$ strace -P d -e inject=%stat:retval=0 -e inject=openat:error=ENOENT:when=1 gnu-cp s d 2> /dev/null
$ file d
d: empty

Activity

  1. ChrisDryden commented on Dec 28, 2025

    @ChrisDryden
    Collaborator

    That's a great way of injecting the errors, I wonder if we can make some helper methods for our rust integ tests that use that to make it easier to test these cases

  2. oech3 commented on Dec 28, 2025

    @oech3
    ContributorAuthor

    Helper for unshare -rm bash is also useful. dmsetup might bit difficult to add.

  3. ChrisDryden commented on Dec 28, 2025

    @ChrisDryden
    Collaborator

    Do you think we can change more of the LD_PRELOAD tests using this method? I think the ones using mtab are way more complex but maybe there's a few others that would work

  4. oech3 commented on Dec 28, 2025

    @oech3
    ContributorAuthor

    No idea about tail's race things currently

  5. changed the title [-]cp, nfs-removal-race.sh? : strace -P d -e inject=statx:retval=0 -e inject=openat:error=ENOENT:when=1 cp s d fails[/-] [+]cp, nfs-removal-race.sh? : strace -P d -e inject=%stat:retval=0 -e inject=openat:error=ENOENT:when=1 cp s d fails[/+] on Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions