{"action":"created","issue":{"url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/921","labels_url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/921/labels{/name}","comments_url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/921/comments","events_url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/921/events","html_url":"https://github.com/pagespeed/ngx_pagespeed/issues/921","id":58121942,"number":921,"title":"error in net/instaweb/automatic/system_tests/local_storage_cache.sh","user":{"login":"oschaaf","id":2239556,"avatar_url":"https://avatars.githubusercontent.com/u/2239556?v=3","gravatar_id":"","url":"https://api.github.com/users/oschaaf","html_url":"https://github.com/oschaaf","followers_url":"https://api.github.com/users/oschaaf/followers","following_url":"https://api.github.com/users/oschaaf/following{/other_user}","gists_url":"https://api.github.com/users/oschaaf/gists{/gist_id}","starred_url":"https://api.github.com/users/oschaaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oschaaf/subscriptions","organizations_url":"https://api.github.com/users/oschaaf/orgs","repos_url":"https://api.github.com/users/oschaaf/repos","events_url":"https://api.github.com/users/oschaaf/events{/privacy}","received_events_url":"https://api.github.com/users/oschaaf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-18T20:17:22Z","updated_at":"2015-02-23T15:32:35Z","closed_at":null,"body":"The local storage cache system tests write out some messages to `stderr`, which is hard to see because there's a lot of informational lines being written to stderr when running the system tests (mostly by wget).\r\n\r\nOutput on stderr:\r\n```\r\ngrep: .alt=A cup of joe.,: No such file or directory\r\ngrep: .alt=A cup of joe.,: No such file or directory\r\ngrep: .alt=A cup of joe.s ..joe...,: No such file or directory\r\ngrep: .alt=A cup of joe.s ..joe...);: No such file or directory\r\n```\r\n\r\nLooking at net/instaweb/automatic/system_tests/local_storage_cache.sh, it looks like some sort\r\nof line/string continuation was intended, but I'm not sure.\r\n\r\n```bash\r\ncheck grep -q \\\r\n  \"pagespeed.localStorageCache.inlineImg(.http://.*/images/Cuppa.png.,\" \\\r\n  \".alt=A cup of joe.,\" \\\r\n  \".alt=A cup of joe.,\" \\\r\n  \".alt=A cup of joe.s ..joe...,\" \\\r\n  \".alt=A cup of joe.s ..joe...);\" \\\r\n  $FETCHED\r\n```"},"comment":{"url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/comments/75565371","html_url":"https://github.com/pagespeed/ngx_pagespeed/issues/921#issuecomment-75565371","issue_url":"https://api.github.com/repos/pagespeed/ngx_pagespeed/issues/921","id":75565371,"user":{"login":"jeffkaufman","id":262566,"avatar_url":"https://avatars.githubusercontent.com/u/262566?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffkaufman","html_url":"https://github.com/jeffkaufman","followers_url":"https://api.github.com/users/jeffkaufman/followers","following_url":"https://api.github.com/users/jeffkaufman/following{/other_user}","gists_url":"https://api.github.com/users/jeffkaufman/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffkaufman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffkaufman/subscriptions","organizations_url":"https://api.github.com/users/jeffkaufman/orgs","repos_url":"https://api.github.com/users/jeffkaufman/repos","events_url":"https://api.github.com/users/jeffkaufman/events{/privacy}","received_events_url":"https://api.github.com/users/jeffkaufman/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T15:32:35Z","updated_at":"2015-02-23T15:32:35Z","body":"I would expect that test to just fail, because grep should return an error if it can't find an input file:\r\n\r\n```\r\n$ grep a b <(echo a b c)\r\ngrep: b: No such file or directory\r\n/dev/fd/63:a b c\r\n$ echo $?\r\n2\r\n```\r\n\r\nBut there's a `-q` on the `grep`, so it just prints a message to stderr and continues on:\r\n\r\n```\r\n$ grep -q a b <(echo a b c)\r\ngrep: b: No such file or directory\r\njefftk@asterix ~/g/google3/net/instaweb $ echo $?\r\n0\r\n```\r\n\r\nThe test should be:\r\n\r\n```\r\nSEARCH_FOR=\"pagespeed.localStorageCache.inlineImg(.http://.*/images/Cuppa.png.,\"\r\nSEARCH_FOR+=\".alt=A cup of joe.,.alt=A cup of joe.,\"\r\nSEARCH_FOR+=\".alt=A cup of joe.s ..joe...,.alt=A cup of joe.s ..joe...);\"\r\ncheck grep -q \"$SEARCH_FOR\" $FETCHED\r\n```\r\n\r\nI'll fix it."}}