Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make android logging work for multiple println calls #21950

Merged
merged 3 commits into from Oct 15, 2018

Conversation

@jdm
Copy link
Member

jdm commented Oct 15, 2018

The existing implementation had incorrect calculations for calculating when there was unlogged data sitting in the buffer and when the buffer was full. With these changes I am able to see the expected output for the following testcase:

<script>
  console.log("hi");
  console.log("hi there");
  console.log("hi there again");
  let s = "hi there again x2 ";
  for (var i = 0; i < 10; i++) {
    s += s;
  }
  console.log(s);
  </script>

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #21875
  • These changes do not require tests because no automated tests for behaviour of logcat on android

This change is Reviewable

@highfive
Copy link

highfive commented Oct 15, 2018

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@nox
Copy link
Member

nox commented Oct 15, 2018

@bors-servo r+

PogChamp

@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

📌 Commit 008f05a has been approved by nox

@highfive highfive assigned nox and unassigned SimonSapin Oct 15, 2018
@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

Testing commit 008f05a with merge 2bf5597...

bors-servo added a commit that referenced this pull request Oct 15, 2018
Make android logging work for multiple println calls

The existing implementation had incorrect calculations for calculating when there was unlogged data sitting in the buffer and when the buffer was full. With these changes I am able to see the expected output for the following testcase:
```html
<script>
  console.log("hi");
  console.log("hi there");
  console.log("hi there again");
  let s = "hi there again x2 ";
  for (var i = 0; i < 10; i++) {
    s += s;
  }
  console.log(s);
  </script>
```

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21875
- [x] These changes do not require tests because no automated tests for behaviour of logcat on android

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21950)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

💔 Test failed - android-x86

@jdm jdm force-pushed the jdm:android-logging-fix branch from 008f05a to 3db990a Oct 15, 2018
@jdm
Copy link
Member Author

jdm commented Oct 15, 2018

@bors-servo r=nox

@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

📌 Commit 3db990a has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

Testing commit 3db990a with merge 08c0e63...

bors-servo added a commit that referenced this pull request Oct 15, 2018
Make android logging work for multiple println calls

The existing implementation had incorrect calculations for calculating when there was unlogged data sitting in the buffer and when the buffer was full. With these changes I am able to see the expected output for the following testcase:
```html
<script>
  console.log("hi");
  console.log("hi there");
  console.log("hi there again");
  let s = "hi there again x2 ";
  for (var i = 0; i < 10; i++) {
    s += s;
  }
  console.log(s);
  </script>
```

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21875
- [x] These changes do not require tests because no automated tests for behaviour of logcat on android

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21950)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

💔 Test failed - android-x86

@jdm jdm force-pushed the jdm:android-logging-fix branch from 3db990a to 1332026 Oct 15, 2018
@jdm
Copy link
Member Author

jdm commented Oct 15, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

📌 Commit 1332026 has been approved by jdm

@highfive highfive assigned jdm and unassigned nox Oct 15, 2018
@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

Testing commit 1332026 with merge fcc42ef...

bors-servo added a commit that referenced this pull request Oct 15, 2018
Make android logging work for multiple println calls

The existing implementation had incorrect calculations for calculating when there was unlogged data sitting in the buffer and when the buffer was full. With these changes I am able to see the expected output for the following testcase:
```html
<script>
  console.log("hi");
  console.log("hi there");
  console.log("hi there again");
  let s = "hi there again x2 ";
  for (var i = 0; i < 10; i++) {
    s += s;
  }
  console.log(s);
  </script>
```

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21875
- [x] These changes do not require tests because no automated tests for behaviour of logcat on android

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21950)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

💔 Test failed - linux-rel-wpt

@jdm
Copy link
Member Author

jdm commented Oct 15, 2018

@bors-servo retry

  • oom
@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

Testing commit 1332026 with merge 683298a...

bors-servo added a commit that referenced this pull request Oct 15, 2018
Make android logging work for multiple println calls

The existing implementation had incorrect calculations for calculating when there was unlogged data sitting in the buffer and when the buffer was full. With these changes I am able to see the expected output for the following testcase:
```html
<script>
  console.log("hi");
  console.log("hi there");
  console.log("hi there again");
  let s = "hi there again x2 ";
  for (var i = 0; i < 10; i++) {
    s += s;
  }
  console.log(s);
  </script>
```

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21875
- [x] These changes do not require tests because no automated tests for behaviour of logcat on android

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21950)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

@bors-servo bors-servo merged commit 1332026 into servo:master Oct 15, 2018
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@nox
Copy link
Member

nox commented Oct 16, 2018

Output is still not showing.

@jdm
Copy link
Member Author

jdm commented Oct 16, 2018

This did not make the nightly build, if that's what you're testing.

@nox
Copy link
Member

nox commented Oct 16, 2018

Nah I just forgot to reinstall the app on my device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.