Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 852
    • Issues 852
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 42
    • Merge requests 42
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Merge requests
  • !2990

gio/tests/g-file-info: don't assume million-in-one events don't happen

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Ross Burton requested to merge rburton/glib:time into main Oct 20, 2022
  • Overview 2
  • Commits 1
  • Pipelines 2
  • Changes 1

The access and creation time tests create a file, gets the time in seconds, then gets the time in microseconds and assumes that the difference between the two has to be above 0.

As rare as this may be, it can happen:

$ stat g-file-info-test-50A450 -c %y 2021-07-06 18:24:56.000000767 +0100

Change the test to simply assert that the difference not negative to handle this case.

This is the same fix as 289f8be1, but that was just modification time.

Edited Oct 20, 2022 by Emmanuele Bassi
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: time