[PATCH] D92902: [llvm-elfabi] Add flag to keep timestamp when output is the same

Haowei Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 22:10:23 PST 2021


haowei added a comment.

In D92902#2525352 <https://reviews.llvm.org/D92902#2525352>, @gargaroff wrote:

> Hi @haowei !
> The tests are failing on Windows with GnuWin32 installed, because touch fails to parse the date string:
>
>   C:\GnuWin\bin\touch.exe: invalid date format `197001010000'
>
> Could you take a look and fix this? I'm using the pre-merge-checks Windows container to test this.

Do you mean this patch failed on windows pre-merge checks? It didn't happen when I commit my change though.  Do you have a link for that?

I also cannot reproduce the same error on my personal windows desktop using gnuwin32:

  C:\Users\Zero\Downloads\GnuBin\GetGnuWin32\bin>touch.exe --help
  Usage: touch.exe [OPTION]... FILE...
  Update the access and modification times of each FILE to the current time.
  
  Mandatory arguments to long options are mandatory for short options too.
    -a                     change only the access time
    -c, --no-create        do not create any files
    -d, --date=STRING      parse STRING and use it instead of current time
    -f                     (ignored)
    -m                     change only the modification time
    -r, --reference=FILE   use this file's times instead of current time
    -t STAMP               use [[CC]YY]MMDDhhmm[.ss] instead of current time
    --time=WORD            change the specified time:
                             WORD is access, atime, or use: equivalent to -a
                             WORD is modify or mtime: equivalent to -m
        --help     display this help and exit
        --version  output version information and exit
  
  Note that the -d and -t options accept different time-date formats.
  
  Report bugs to <bug-coreutils at gnu.org>.
  
  C:\Users\Zero\Downloads\GnuBin\GetGnuWin32\bin>touch.exe -m -t 197001010000 wget.ini
  
  C:\Users\Zero\Downloads\GnuBin\GetGnuWin32\bin>dir wget.ini
   Volume in drive C has no label.
  
   Directory of C:\Users\Zero\Downloads\GnuBin\GetGnuWin32\bin
  
  01/01/1970  00:00             4,021 wget.ini
                 1 File(s)          4,021 bytes
                 0 Dir(s)  1,046,724,939,776 bytes free
  
  C:\Users\Zero\Downloads\GnuBin\GetGnuWin32\bin>

On my machine the touch.exe has no trouble to parse the timestamp used in the unit test.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92902/new/

https://reviews.llvm.org/D92902



More information about the llvm-commits mailing list