{"thread":{"id":"49701","subject":"t7405.17 breakage vanishes with GETTEXT_POISON=1","startedAt":"2018-10-28T05:51:47Z","lastAt":"2018-10-29T16:19:37Z","messageCount":4,"participants":["Duy Nguyen","SZEDER Gábor","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"361822","messageId":"CACsJy8B=gxVMrZnr-BNp=VCHea8wpx+GCE4N76=vSGMnX2rSbA@mail.gmail.com","threadId":"49701","inReplyTo":null,"subject":"t7405.17 breakage vanishes with GETTEXT_POISON=1","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-10-28T05:41:06Z","receivedAt":"2018-10-28T05:51:47Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Something fishy is going on but I don't think I'll spend time hunting\nit down so I post here in case somebody else is interested. It might\nalso indicate a problem with poison gettext, not the test case too.\n-- \nDuy\n"},{"id":"361839","messageId":"20181028121517.GO30222@szeder.dev","threadId":"49701","inReplyTo":"CACsJy8B=gxVMrZnr-BNp=VCHea8wpx+GCE4N76=vSGMnX2rSbA@mail.gmail.com","subject":"Re: t7405.17 breakage vanishes with GETTEXT_POISON=1","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-10-28T12:15:17Z","receivedAt":"2018-10-28T12:15:25Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sun, Oct 28, 2018 at 06:41:06AM +0100, Duy Nguyen wrote:\n> Something fishy is going on but I don't think I'll spend time hunting\n> it down so I post here in case somebody else is interested. It might\n> also indicate a problem with poison gettext, not the test case too.\n\nI haven't actually run the test under GETTEXT_POISON, but I stongly\nsuspect it's the test, or more accurately the helper function\n'test_i18ngrep'.\n\nThe test in question runs\n\n  test_i18ngrep ! \"refusing to lose untracked file at\" err\n\nwhich fails in normal test runs, because 'grep' does find the\nundesired string; that's the known breakage.  Under GETTEXT_POISION,\nhowever, 'test_i18ngrep' always succeeds because of this condition:\n\n  if test -n \"$GETTEXT_POISON\"\n  then\n          # pretend success\n          return 0\n  fi\n\nand then in turn the whole test succeeds.\n"},{"id":"361864","messageId":"xmqqzhux77ag.fsf@gitster-ct.c.googlers.com","threadId":"49701","inReplyTo":"20181028121517.GO30222@szeder.dev","subject":"Re: t7405.17 breakage vanishes with GETTEXT_POISON=1","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-10-29T03:36:55Z","receivedAt":"2018-10-29T03:37:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder.dev@gmail.com> writes:\n\n> The test in question runs\n>\n>   test_i18ngrep ! \"refusing to lose untracked file at\" err\n>\n> which fails in normal test runs, because 'grep' does find the\n> undesired string; that's the known breakage.  Under GETTEXT_POISION,\n> however, 'test_i18ngrep' always succeeds because of this condition:\n>\n>   if test -n \"$GETTEXT_POISON\"\n>   then\n>           # pretend success\n>           return 0\n>   fi\n>\n> and then in turn the whole test succeeds.\n\nAh, good spotting.\n\nIf a test using \"grep\" declares that something must not exist in\nplumbing message, it writes \"! grep something\", and because\n\"test_i18ngrep something\" always pretends that something is found\nunder poisoned build (by the way, would this change when we remove\nthe separate poisoned build?), \"test_i18ngrep ! something\" must be\nused for Porcelain messages to say the same thing.\n\nOf course, this has a funny interactions with test_expect_failure.\nI actually do not think the complexity to work this around is worth\nit.  \n\nChanging behaviour of \"test_i18ngrep ! something\" to always fail\nunder poisoned build would not work, of course, and changing it to\nalways fail under poisoned build inside test_expect_failure would\nnot be a good idea, either, because the know breakage may be at\nsteps in the same test that is different from the grep, e.g., we may\nhave a \"git dothis\" command that should keep the HEAD without\nemitting an error message, and we may test it like so:\n\n\tgit rev-parse HEAD >old &&\n\tgit dothis >out 2>err &&\n\ttest_i18ngrep ! error: err && # no error should be seen\n\tgit rev-parse HEAD >new &&\n\ttest_cmp old new\n\nbut currently the command may have a known bug that it moves HEAD;\nthe command however does not emit an error message.\n\nSO...\n"},{"id":"361917","messageId":"CACsJy8CWkxfkOEzTBwuD0hyATuc+i3DWYZ2k+kA0CbxFhcgs6g@mail.gmail.com","threadId":"49701","inReplyTo":"20181028121517.GO30222@szeder.dev","subject":"Re: t7405.17 breakage vanishes with GETTEXT_POISON=1","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-10-29T16:19:06Z","receivedAt":"2018-10-29T16:19:37Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sun, Oct 28, 2018 at 1:15 PM SZEDER Gábor <szeder.dev@gmail.com> wrote:\n>\n> On Sun, Oct 28, 2018 at 06:41:06AM +0100, Duy Nguyen wrote:\n> > Something fishy is going on but I don't think I'll spend time hunting\n> > it down so I post here in case somebody else is interested. It might\n> > also indicate a problem with poison gettext, not the test case too.\n>\n> I haven't actually run the test under GETTEXT_POISON, but I stongly\n> suspect it's the test, or more accurately the helper function\n> 'test_i18ngrep'.\n>\n> The test in question runs\n>\n>   test_i18ngrep ! \"refusing to lose untracked file at\" err\n>\n> which fails in normal test runs, because 'grep' does find the\n> undesired string; that's the known breakage.  Under GETTEXT_POISION,\n> however, 'test_i18ngrep' always succeeds because of this condition:\n>\n>   if test -n \"$GETTEXT_POISON\"\n>   then\n>           # pretend success\n>           return 0\n>   fi\n>\n> and then in turn the whole test succeeds.\n\nAnd this is something your poison-with-scrambling code does help ;-) ;-)\n-- \nDuy\n"}]}