I like the ideal of running line from tank and watch it empty a tank of fuel, that would rule out petcock, I have had this happen on several bikes and it was always the petcock.
I was riding down the road just a month or so ago and suddenly my XS started acting up, popping back and finally cut off. I rolled to the side, looked at the clear fuel filter and guess what? No gas.
Opened tank, it was over 3/4 full. I shook the bike hard left and right and the gas filled the filter again.
I went home, flushed the tank and blew compressed air through the petcock backwards.
Over 1000 miles since and not a problem.
I'm becoming very leery of a lot of gas stations.