LINBIT / drbd-utils

DRBD userspace utilities (for 9.x, 8.4, 8.3)
GNU General Public License v2.0
78 stars 46 forks source link

maketest : adjusted sed check against timestamp #35

Closed jtiltx closed 10 months ago

jtiltx commented 10 months ago

Adding pull request to address sed check see #34

rck commented 10 months ago

and out of curiosity, @jtiltx what kind of sed/version/distribution are you using that this triggers? [edit]okay, that is in the issue, weird, I use Debian testing and it works just fine for me[/edit]

rck commented 10 months ago

ah, @JoelColledge next guess would be this is actually a locale issue... If so, we should set some LC_ALL and friends. or actually it sounds like a TZ issue

JoelColledge commented 10 months ago

@JoelColledge I think this is your code, was the + meant to be escpaced/literal?

+ is a literal. We're calling sed without -E so + without a backslash matches a literal +.

ah, @JoelColledge next guess would be this is actually a locale issue... If so, we should set some LC_ALL and friends

This is my suspicion too.

rck commented 10 months ago

reproducer: TZ=America/Lima make test

jtiltx commented 10 months ago

@rck

root@d12:~# sed --version
sed (GNU sed) 4.9
Packaged by Debian

My timezone is : America/Los_Angeles Let me know if you still want me to adjust the pr, or if you have something else in mind at this time.

rck commented 10 months ago

@jtiltx thanks, we found a reproducer, it is actually a time zone issue, so we can not take you patch as it would break it for other time zones (like mine :) ). we will prepare a patch that will supersede this MR, but thanks for reporting and taking the effort

jtiltx commented 10 months ago

@rck yeah figured it was a -/+ GMT thing. I thought the (.) would apply to both, but yeah prolly more verbose ways. Thanks for fixing -- cheers!

rck commented 10 months ago

should be fixed in https://github.com/LINBIT/drbd-utils/commit/fc49473cde48a9b2bb645ad042abfc56ce2e2e2f